; 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._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }
%struct._VlFrameOrientedEllipse = type { float, float, 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 uwtable
define dso_local void @vl_covdet_extract_laplacian_scales(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct._VlCovDetFeature, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct._VlCovDetFeature, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call i64 @vl_covdet_get_num_features(ptr noundef %12)
  store i64 %13, ptr %6, align 8, !tbaa !11
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._VlCovDet, ptr %14, i32 0, i32 25
  %16 = getelementptr inbounds [5 x i64], ptr %15, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 40, i1 false)
  store i64 0, ptr %3, align 8, !tbaa !11
  br label %17

17:                                               ; preds = %138, %1
  %18 = load i64, ptr %3, align 8, !tbaa !11
  %19 = load i64, ptr %6, align 8, !tbaa !11
  %20 = trunc i64 %19 to i32
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %18, %21
  br i1 %22, label %23, label %141

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #4
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._VlCovDet, ptr %24, i32 0, i32 10
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = load i64, ptr %3, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct._VlCovDetFeature, ptr %26, i64 %27
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %28, i64 40, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._VlCovDetFeature, ptr %8, i32 0, i32 0
  %31 = call ptr @vl_covdet_extract_laplacian_scales_for_frame(ptr noundef %29, ptr noundef %7, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8 %30)
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._VlCovDet, ptr %32, i32 0, i32 25
  %34 = load i64, ptr %7, align 8, !tbaa !11
  %35 = getelementptr inbounds [5 x i64], ptr %33, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !11
  %37 = add i64 %36, 1
  store i64 %37, ptr %35, align 8, !tbaa !11
  %38 = load i64, ptr %7, align 8, !tbaa !11
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %23
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %50

43:                                               ; preds = %40
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._VlCovDet, ptr %44, i32 0, i32 10
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load i64, ptr %3, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct._VlCovDetFeature, ptr %46, i64 %47
  %49 = getelementptr inbounds %struct._VlCovDetFeature, ptr %48, i32 0, i32 1
  store float 0.000000e+00, ptr %49, align 4, !tbaa !19
  br label %50

50:                                               ; preds = %43, %40, %23
  store i64 0, ptr %4, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %134, %50
  %52 = load i64, ptr %4, align 8, !tbaa !11
  %53 = load i64, ptr %7, align 8, !tbaa !11
  %54 = trunc i64 %53 to i32
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %52, %55
  br i1 %56, label %57, label %137

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %58 = load i64, ptr %4, align 8, !tbaa !11
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %66

60:                                               ; preds = %57
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._VlCovDet, ptr %61, i32 0, i32 10
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = load i64, ptr %3, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct._VlCovDetFeature, ptr %63, i64 %64
  store ptr %65, ptr %10, align 8, !tbaa !5
  br label %77

66:                                               ; preds = %57
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = call i32 @vl_covdet_append_feature(ptr noundef %67, ptr noundef %8)
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._VlCovDet, ptr %69, i32 0, i32 10
  %71 = load ptr, ptr %70, align 8, !tbaa !13
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._VlCovDet, ptr %72, i32 0, i32 11
  %74 = load i64, ptr %73, align 8, !tbaa !22
  %75 = sub i64 %74, 1
  %76 = getelementptr inbounds %struct._VlCovDetFeature, ptr %71, i64 %75
  store ptr %76, ptr %10, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %66, %60
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i64, ptr %4, align 8, !tbaa !11
  %80 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %78, i64 %79
  %81 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %80, i32 0, i32 1
  %82 = load double, ptr %81, align 8, !tbaa !23
  %83 = fptrunc double %82 to float
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._VlCovDetFeature, ptr %84, i32 0, i32 4
  store float %83, ptr %85, align 4, !tbaa !25
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load i64, ptr %4, align 8, !tbaa !11
  %88 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %86, i64 %87
  %89 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %88, i32 0, i32 0
  %90 = load double, ptr %89, align 8, !tbaa !26
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._VlCovDetFeature, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %92, i32 0, i32 2
  %94 = load float, ptr %93, align 4, !tbaa !27
  %95 = fpext float %94 to double
  %96 = fmul double %95, %90
  %97 = fptrunc double %96 to float
  store float %97, ptr %93, align 4, !tbaa !27
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = load i64, ptr %4, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %98, i64 %99
  %101 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %100, i32 0, i32 0
  %102 = load double, ptr %101, align 8, !tbaa !26
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._VlCovDetFeature, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %104, i32 0, i32 4
  %106 = load float, ptr %105, align 4, !tbaa !28
  %107 = fpext float %106 to double
  %108 = fmul double %107, %102
  %109 = fptrunc double %108 to float
  store float %109, ptr %105, align 4, !tbaa !28
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load i64, ptr %4, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %110, i64 %111
  %113 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %112, i32 0, i32 0
  %114 = load double, ptr %113, align 8, !tbaa !26
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._VlCovDetFeature, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %116, i32 0, i32 3
  %118 = load float, ptr %117, align 4, !tbaa !29
  %119 = fpext float %118 to double
  %120 = fmul double %119, %114
  %121 = fptrunc double %120 to float
  store float %121, ptr %117, align 4, !tbaa !29
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load i64, ptr %4, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %122, i64 %123
  %125 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %124, i32 0, i32 0
  %126 = load double, ptr %125, align 8, !tbaa !26
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._VlCovDetFeature, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %128, i32 0, i32 5
  %130 = load float, ptr %129, align 4, !tbaa !30
  %131 = fpext float %130 to double
  %132 = fmul double %131, %126
  %133 = fptrunc double %132 to float
  store float %133, ptr %129, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %134

134:                                              ; preds = %77
  %135 = load i64, ptr %4, align 8, !tbaa !11
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %4, align 8, !tbaa !11
  br label %51, !llvm.loop !31

137:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %3, align 8, !tbaa !11
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %3, align 8, !tbaa !11
  br label %17, !llvm.loop !33

141:                                              ; preds = %17
  %142 = load i32, ptr %5, align 4, !tbaa !9
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %177

144:                                              ; preds = %141
  store i64 0, ptr %4, align 8, !tbaa !11
  store i64 0, ptr %3, align 8, !tbaa !11
  br label %145

145:                                              ; preds = %170, %144
  %146 = load i64, ptr %3, align 8, !tbaa !11
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._VlCovDet, ptr %147, i32 0, i32 11
  %149 = load i64, ptr %148, align 8, !tbaa !22
  %150 = trunc i64 %149 to i32
  %151 = sext i32 %150 to i64
  %152 = icmp slt i64 %146, %151
  br i1 %152, label %153, label %173

153:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._VlCovDet, ptr %154, i32 0, i32 10
  %156 = load ptr, ptr %155, align 8, !tbaa !13
  %157 = load i64, ptr %3, align 8, !tbaa !11
  %158 = getelementptr inbounds %struct._VlCovDetFeature, ptr %156, i64 %157
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %158, i64 40, i1 false), !tbaa.struct !16
  %159 = getelementptr inbounds %struct._VlCovDetFeature, ptr %11, i32 0, i32 1
  %160 = load float, ptr %159, align 4, !tbaa !19
  %161 = fcmp une float %160, 0.000000e+00
  br i1 %161, label %162, label %169

162:                                              ; preds = %153
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._VlCovDet, ptr %163, i32 0, i32 10
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = load i64, ptr %4, align 8, !tbaa !11
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %4, align 8, !tbaa !11
  %168 = getelementptr inbounds %struct._VlCovDetFeature, ptr %165, i64 %166
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %168, ptr align 4 %11, i64 40, i1 false), !tbaa.struct !16
  br label %169

169:                                              ; preds = %162, %153
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  br label %170

170:                                              ; preds = %169
  %171 = load i64, ptr %3, align 8, !tbaa !11
  %172 = add nsw i64 %171, 1
  store i64 %172, ptr %3, align 8, !tbaa !11
  br label %145, !llvm.loop !34

173:                                              ; preds = %145
  %174 = load i64, ptr %4, align 8, !tbaa !11
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._VlCovDet, ptr %175, i32 0, i32 11
  store i64 %174, ptr %176, align 8, !tbaa !22
  br label %177

177:                                              ; preds = %173, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

; 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_laplacian_scales_for_frame(ptr noundef, ptr noundef, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 80}
!14 = !{!"_VlCovDet", !6, i64 0, !6, i64 8, !10, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !12, i64 48, !12, i64 56, !15, i64 64, !12, i64 72, !6, i64 80, !12, i64 88, !12, i64 96, !6, i64 104, !12, i64 112, !10, i64 120, !7, i64 128, !7, i64 192, !10, i64 256, !7, i64 260, !7, i64 6984, !7, i64 13708, !7, i64 20432, !7, i64 27156, !7, i64 31512, !7, i64 75072}
!15 = !{!"double", !7, i64 0}
!16 = !{i64 0, i64 4, !17, i64 4, i64 4, !17, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 4, !17, i64 20, i64 4, !17, i64 24, i64 4, !17, i64 28, i64 4, !17, i64 32, i64 4, !17, i64 36, i64 4, !17}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !18, i64 24}
!20 = !{!"_VlCovDetFeature", !21, i64 0, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36}
!21 = !{!"_VlFrameOrientedEllipse", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20}
!22 = !{!14, !12, i64 88}
!23 = !{!24, !15, i64 8}
!24 = !{!"_VlCovDetFeatureLaplacianScale", !15, i64 0, !15, i64 8}
!25 = !{!20, !18, i64 36}
!26 = !{!24, !15, i64 0}
!27 = !{!20, !18, i64 8}
!28 = !{!20, !18, i64 16}
!29 = !{!20, !18, i64 12}
!30 = !{!20, !18, i64 20}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}


; 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._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }
%struct._VlFrameOrientedEllipse = type { float, float, float, float, float, float }
%struct._VlCovDetFeatureLaplacianScale = 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @vl_covdet_extract_laplacian_scales(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca i64, align 8
  %3 = alloca %struct._VlCovDetFeature, align 8
  %4 = tail call i64 @vl_covdet_get_num_features(ptr noundef %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 75072
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %5, i8 0, i64 40, i1 false)
  %sext = shl i64 %4, 32
  %6 = ashr exact i64 %sext, 32
  %7 = icmp sgt i64 %6, 0
  br i1 %7, label %.lr.ph57, label %.preheader

.lr.ph57:                                         ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  br label %15

.preheader:                                       ; preds = %._crit_edge, %1
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = trunc i64 %11 to i32
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.preheader
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  br label %61

15:                                               ; preds = %.lr.ph57, %._crit_edge
  %.055 = phi i64 [ 0, %.lr.ph57 ], [ %60, %._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
  %16 = load ptr, ptr %8, align 8, !tbaa !13
  %17 = getelementptr inbounds %struct._VlCovDetFeature, ptr %16, i64 %.055
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 4 dereferenceable(40) %17, i64 40, i1 false), !tbaa.struct !14
  %18 = call ptr @vl_covdet_extract_laplacian_scales_for_frame(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull byval(%struct._VlFrameOrientedEllipse) align 8 %3)
  %19 = load i64, ptr %2, align 8, !tbaa !17
  %20 = getelementptr inbounds [5 x i64], ptr %5, i64 0, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !17
  %22 = add i64 %21, 1
  store i64 %22, ptr %20, align 8, !tbaa !17
  %23 = icmp eq i64 %19, 0
  br i1 %23, label %.thread, label %26

.thread:                                          ; preds = %15
  %24 = load ptr, ptr %8, align 8, !tbaa !13
  %25 = getelementptr inbounds %struct._VlCovDetFeature, ptr %24, i64 %.055, i32 1
  store float 0.000000e+00, ptr %25, align 4, !tbaa !18
  br label %._crit_edge

26:                                               ; preds = %15
  %27 = trunc i64 %19 to i32
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %26
  %29 = load ptr, ptr %8, align 8, !tbaa !13
  %30 = getelementptr inbounds %struct._VlCovDetFeature, ptr %29, i64 %.055
  %.phi.trans.insert65 = getelementptr inbounds i8, ptr %30, i64 8
  %.pre64 = load double, ptr %18, align 8, !tbaa !21
  %.phi.trans.insert = getelementptr inbounds i8, ptr %18, i64 8
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !23
  %31 = fptrunc double %.pre to float
  %32 = getelementptr inbounds i8, ptr %30, i64 36
  store float %31, ptr %32, align 4, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %30, i64 8
  %34 = load <4 x float>, ptr %.phi.trans.insert65, align 4, !tbaa !15
  %35 = fpext <4 x float> %34 to <4 x double>
  %36 = insertelement <4 x double> poison, double %.pre64, i64 0
  %37 = shufflevector <4 x double> %36, <4 x double> poison, <4 x i32> zeroinitializer
  %38 = fmul <4 x double> %37, %35
  %39 = fptrunc <4 x double> %38 to <4 x float>
  store <4 x float> %39, ptr %33, align 4, !tbaa !15
  %sext52.peel = and i64 %19, 2147483646
  %.not = icmp eq i64 %sext52.peel, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph.peel.next

.lr.ph.peel.next:                                 ; preds = %.lr.ph.preheader, %.lr.ph.peel.next
  %.04954 = phi i64 [ %57, %.lr.ph.peel.next ], [ 1, %.lr.ph.preheader ]
  %40 = call i32 @vl_covdet_append_feature(ptr noundef nonnull %0, ptr noundef nonnull %3)
  %.pre73 = load i64, ptr %2, align 8, !tbaa !17
  %41 = load ptr, ptr %8, align 8, !tbaa !13
  %42 = load i64, ptr %9, align 8, !tbaa !5
  %43 = getelementptr %struct._VlCovDetFeature, ptr %41, i64 %42
  %44 = getelementptr inbounds %struct._VlCovDetFeatureLaplacianScale, ptr %18, i64 %.04954
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load double, ptr %45, align 8, !tbaa !23
  %47 = fptrunc double %46 to float
  %48 = getelementptr i8, ptr %43, i64 -4
  store float %47, ptr %48, align 4, !tbaa !24
  %49 = load double, ptr %44, align 8, !tbaa !21
  %50 = getelementptr i8, ptr %43, i64 -32
  %51 = load <4 x float>, ptr %50, align 4, !tbaa !15
  %52 = fpext <4 x float> %51 to <4 x double>
  %53 = insertelement <4 x double> poison, double %49, i64 0
  %54 = shufflevector <4 x double> %53, <4 x double> poison, <4 x i32> zeroinitializer
  %55 = fmul <4 x double> %54, %52
  %56 = fptrunc <4 x double> %55 to <4 x float>
  store <4 x float> %56, ptr %50, align 4, !tbaa !15
  %57 = add nuw nsw i64 %.04954, 1
  %sext52 = shl i64 %.pre73, 32
  %58 = ashr exact i64 %sext52, 32
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !25

._crit_edge:                                      ; preds = %.lr.ph.peel.next, %.lr.ph.preheader, %.thread, %26
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %60 = add nuw nsw i64 %.055, 1
  %exitcond.not = icmp eq i64 %60, %6
  br i1 %exitcond.not, label %.preheader, label %15, !llvm.loop !28

61:                                               ; preds = %.lr.ph61, %69
  %62 = phi i64 [ %11, %.lr.ph61 ], [ %70, %69 ]
  %.160 = phi i64 [ 0, %.lr.ph61 ], [ %71, %69 ]
  %.15059 = phi i64 [ 0, %.lr.ph61 ], [ %.2, %69 ]
  %63 = load ptr, ptr %14, align 8, !tbaa !13
  %64 = getelementptr inbounds %struct._VlCovDetFeature, ptr %63, i64 %.160
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 24
  %.sroa.4.0.copyload = load float, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !15
  %65 = fcmp une float %.sroa.4.0.copyload, 0.000000e+00
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 28
  %67 = add nsw i64 %.15059, 1
  %68 = getelementptr inbounds %struct._VlCovDetFeature, ptr %63, i64 %.15059
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(24) %64, i64 24, i1 false)
  %.sroa.4.0..sroa_idx2 = getelementptr inbounds i8, ptr %68, i64 24
  store float %.sroa.4.0.copyload, ptr %.sroa.4.0..sroa_idx2, align 4, !tbaa !15
  %.sroa.5.0..sroa_idx4 = getelementptr inbounds i8, ptr %68, i64 28
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.sroa.5.0..sroa_idx4, ptr noundef nonnull align 4 dereferenceable(12) %.sroa.5.0..sroa_idx, i64 12, i1 false)
  %.pre74 = load i64, ptr %10, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %66, %61
  %70 = phi i64 [ %.pre74, %66 ], [ %62, %61 ]
  %.2 = phi i64 [ %67, %66 ], [ %.15059, %61 ]
  %71 = add nuw nsw i64 %.160, 1
  %sext51 = shl i64 %70, 32
  %72 = ashr exact i64 %sext51, 32
  %73 = icmp slt i64 %71, %72
  br i1 %73, label %61, label %._crit_edge62, !llvm.loop !29

._crit_edge62:                                    ; preds = %69, %.preheader
  %.150.lcssa = phi i64 [ 0, %.preheader ], [ %.2, %69 ]
  store i64 %.150.lcssa, ptr %10, align 8, !tbaa !5
  ret void
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 88}
!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 = !{!6, !7, i64 80}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15, i64 8, i64 4, !15, i64 12, i64 4, !15, i64 16, i64 4, !15, i64 20, i64 4, !15, i64 24, i64 4, !15, i64 28, i64 4, !15, i64 32, i64 4, !15, i64 36, i64 4, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !8, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !16, i64 24}
!19 = !{!"_VlCovDetFeature", !20, i64 0, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36}
!20 = !{!"_VlFrameOrientedEllipse", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20}
!21 = !{!22, !11, i64 0}
!22 = !{!"_VlCovDetFeatureLaplacianScale", !11, i64 0, !11, i64 8}
!23 = !{!22, !11, i64 8}
!24 = !{!19, !16, i64 36}
!25 = distinct !{!25, !26, !27}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.peeled.count", i32 1}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


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