; LLVM IR from hlzz/libvot :: src/feature (vlfeat_libvot_api)

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

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"struct.vot::Vlfeature" = type { float, float, float, float, [128 x float] }
%struct._VlFrameOrientedEllipse = type { float, float, float, float, float, float }
%"struct.vot::VlFeatParam" = type <{ double, double, double, i32, [4 x i8] }>
%struct._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(28) %4) #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i64, align 8
  %23 = alloca double, align 8
  %24 = alloca %"class.std::vector.0", align 8
  %25 = alloca %"class.std::allocator.2", align 1
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::vector.0", align 8
  %29 = alloca %"class.std::allocator.2", align 1
  %30 = alloca %"class.std::vector.0", align 8
  %31 = alloca %"class.std::allocator.2", align 1
  %32 = alloca %"struct.vot::Vlfeature", align 4
  %33 = alloca %struct._VlFrameOrientedEllipse, align 8
  %34 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = mul nsw i32 %35, %36
  %38 = sext i32 %37 to i64
  %39 = mul i64 %38, 4
  %40 = call noalias ptr @malloc(i64 noundef %39) #9
  store ptr %40, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %59, %5
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %8, align 4, !tbaa !9
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = mul nsw i32 %43, %44
  %46 = icmp slt i32 %42, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %62

48:                                               ; preds = %41
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = uitofp i8 %53 to float
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds float, ptr %55, i64 %57
  store float %54, ptr %58, align 4, !tbaa !12
  br label %59

59:                                               ; preds = %48
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %12, align 4, !tbaa !9
  br label %41, !llvm.loop !14

62:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %63 = call ptr @vl_covdet_new(i32 noundef 2)
  store ptr %63, ptr %13, align 8, !tbaa !5
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_covdet_set_first_octave(ptr noundef %64, i64 noundef 0)
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %65, i32 0, i32 1
  %67 = load double, ptr %66, align 8, !tbaa !16
  %68 = fcmp ogt double %67, 0.000000e+00
  br i1 %68, label %69, label %74

69:                                               ; preds = %62
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %71, i32 0, i32 1
  %73 = load double, ptr %72, align 8, !tbaa !16
  call void @vl_covdet_set_peak_threshold(ptr noundef %70, double noundef %73)
  br label %74

74:                                               ; preds = %69, %62
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %75, i32 0, i32 0
  %77 = load double, ptr %76, align 8, !tbaa !20
  %78 = fcmp ogt double %77, 0.000000e+00
  br i1 %78, label %79, label %84

79:                                               ; preds = %74
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %81, i32 0, i32 0
  %83 = load double, ptr %82, align 8, !tbaa !20
  call void @vl_covdet_set_edge_threshold(ptr noundef %80, double noundef %83)
  br label %84

84:                                               ; preds = %79, %74
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call i32 @vl_covdet_put_image(ptr noundef %85, ptr noundef %86, i64 noundef %88, i64 noundef %90)
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_covdet_detect(ptr noundef %92)
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_covdet_drop_features_outside(ptr noundef %93, double noundef 1.000000e+00)
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_covdet_extract_affine_shape(ptr noundef %94)
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_covdet_extract_orientations(ptr noundef %95)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = call i64 @vl_covdet_get_num_features(ptr noundef %96)
  store i64 %97, ptr %14, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %98 = load ptr, ptr %13, align 8, !tbaa !5
  %99 = call ptr @vl_covdet_get_features(ptr noundef %98)
  store ptr %99, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %100 = call ptr @vl_sift_new(i32 noundef 16, i32 noundef 16, i32 noundef 1, i32 noundef 3, i32 noundef 0)
  store ptr %100, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 128, ptr %18, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 15, ptr %19, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store double 7.500000e+00, ptr %20, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store double 1.000000e+00, ptr %21, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %101 = load i64, ptr %19, align 8, !tbaa !21
  %102 = mul nsw i64 2, %101
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %22, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %104 = load double, ptr %20, align 8, !tbaa !23
  %105 = load i64, ptr %19, align 8, !tbaa !21
  %106 = sitofp i64 %105 to double
  %107 = fdiv double %104, %106
  store double %107, ptr %23, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  %108 = load i64, ptr %18, align 8, !tbaa !21
  %109 = load i64, ptr %14, align 8, !tbaa !21
  %110 = mul i64 %108, %109
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #8
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %110, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %111 unwind label %131

111:                                              ; preds = %84
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #8
  %112 = load i64, ptr %22, align 8, !tbaa !21
  %113 = load i64, ptr %22, align 8, !tbaa !21
  %114 = mul i64 %112, %113
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #8
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %114, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %115 unwind label %135

115:                                              ; preds = %111
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  %116 = load i64, ptr %22, align 8, !tbaa !21
  %117 = mul i64 2, %116
  %118 = load i64, ptr %22, align 8, !tbaa !21
  %119 = mul i64 %117, %118
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %119, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %120 unwind label %139

120:                                              ; preds = %115
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %121, i32 0, i32 2
  %123 = load double, ptr %122, align 8, !tbaa !24
  %124 = fcmp ogt double %123, 0.000000e+00
  br i1 %124, label %125, label %147

125:                                              ; preds = %120
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %127, i32 0, i32 2
  %129 = load double, ptr %128, align 8, !tbaa !24
  invoke void @_ZL18vl_sift_set_magnifP11_VlSiftFiltd(ptr noundef %126, double noundef %129)
          to label %130 unwind label %143

130:                                              ; preds = %125
  br label %147

131:                                              ; preds = %84
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %26, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %27, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  br label %283

135:                                              ; preds = %111
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %26, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %27, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  br label %282

139:                                              ; preds = %115
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %26, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %27, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  br label %281

143:                                              ; preds = %272, %270, %125
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %26, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %27, align 4
  br label %280

147:                                              ; preds = %130, %120
  store i64 0, ptr %17, align 8, !tbaa !21
  br label %148

148:                                              ; preds = %267, %147
  %149 = load i64, ptr %17, align 8, !tbaa !21
  %150 = load i64, ptr %14, align 8, !tbaa !21
  %151 = trunc i64 %150 to i32
  %152 = sext i32 %151 to i64
  %153 = icmp slt i64 %149, %152
  br i1 %153, label %154, label %270

154:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 528, ptr %32) #8
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = load i64, ptr %17, align 8, !tbaa !21
  %157 = getelementptr inbounds %struct._VlCovDetFeature, ptr %155, i64 %156
  %158 = getelementptr inbounds %struct._VlCovDetFeature, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %158, i32 0, i32 0
  %160 = load float, ptr %159, align 4, !tbaa !25
  %161 = getelementptr inbounds %"struct.vot::Vlfeature", ptr %32, i32 0, i32 0
  store float %160, ptr %161, align 4, !tbaa !28
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = load i64, ptr %17, align 8, !tbaa !21
  %164 = getelementptr inbounds %struct._VlCovDetFeature, ptr %162, i64 %163
  %165 = getelementptr inbounds %struct._VlCovDetFeature, ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %165, i32 0, i32 1
  %167 = load float, ptr %166, align 4, !tbaa !30
  %168 = getelementptr inbounds %"struct.vot::Vlfeature", ptr %32, i32 0, i32 1
  store float %167, ptr %168, align 4, !tbaa !31
  %169 = load ptr, ptr %15, align 8, !tbaa !5
  %170 = load i64, ptr %17, align 8, !tbaa !21
  %171 = getelementptr inbounds %struct._VlCovDetFeature, ptr %169, i64 %170
  %172 = getelementptr inbounds %struct._VlCovDetFeature, ptr %171, i32 0, i32 4
  %173 = load float, ptr %172, align 4, !tbaa !32
  %174 = getelementptr inbounds %"struct.vot::Vlfeature", ptr %32, i32 0, i32 2
  store float %173, ptr %174, align 4, !tbaa !33
  %175 = load ptr, ptr %15, align 8, !tbaa !5
  %176 = load i64, ptr %17, align 8, !tbaa !21
  %177 = getelementptr inbounds %struct._VlCovDetFeature, ptr %175, i64 %176
  %178 = getelementptr inbounds %struct._VlCovDetFeature, ptr %177, i32 0, i32 3
  %179 = load float, ptr %178, align 4, !tbaa !34
  %180 = getelementptr inbounds %"struct.vot::Vlfeature", ptr %32, i32 0, i32 3
  store float %179, ptr %180, align 4, !tbaa !35
  %181 = load ptr, ptr %13, align 8, !tbaa !5
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef 0) #8
  %183 = load i64, ptr %19, align 8, !tbaa !21
  %184 = load double, ptr %20, align 8, !tbaa !23
  %185 = load double, ptr %21, align 8, !tbaa !23
  %186 = load ptr, ptr %15, align 8, !tbaa !5
  %187 = load i64, ptr %17, align 8, !tbaa !21
  %188 = getelementptr inbounds %struct._VlCovDetFeature, ptr %186, i64 %187
  %189 = getelementptr inbounds %struct._VlCovDetFeature, ptr %188, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %189, i64 24, i1 false), !tbaa.struct !36
  %190 = invoke i32 @vl_covdet_extract_patch_for_frame(ptr noundef %181, ptr noundef %182, i64 noundef %183, double noundef %184, double noundef %185, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8 %33)
          to label %191 unwind label %228

191:                                              ; preds = %154
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0) #8
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 1) #8
  %194 = load i64, ptr %22, align 8, !tbaa !21
  %195 = mul i64 2, %194
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef 0) #8
  %197 = load i64, ptr %22, align 8, !tbaa !21
  %198 = load i64, ptr %22, align 8, !tbaa !21
  %199 = load i64, ptr %22, align 8, !tbaa !21
  invoke void @vl_imgradient_polar_f(ptr noundef %192, ptr noundef %193, i64 noundef 2, i64 noundef %195, ptr noundef %196, i64 noundef %197, i64 noundef %198, i64 noundef %199)
          to label %200 unwind label %228

200:                                              ; preds = %191
  %201 = load ptr, ptr %16, align 8, !tbaa !5
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0) #8
  %203 = load i64, ptr %18, align 8, !tbaa !21
  %204 = load i64, ptr %17, align 8, !tbaa !21
  %205 = mul i64 %203, %204
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %205) #8
  %207 = load i64, ptr %22, align 8, !tbaa !21
  %208 = trunc i64 %207 to i32
  %209 = load i64, ptr %22, align 8, !tbaa !21
  %210 = trunc i64 %209 to i32
  %211 = load i64, ptr %22, align 8, !tbaa !21
  %212 = sub i64 %211, 1
  %213 = uitofp i64 %212 to double
  %214 = fdiv double %213, 2.000000e+00
  %215 = load i64, ptr %22, align 8, !tbaa !21
  %216 = sub i64 %215, 1
  %217 = uitofp i64 %216 to double
  %218 = fdiv double %217, 2.000000e+00
  %219 = load double, ptr %20, align 8, !tbaa !23
  %220 = fdiv double %219, 7.500000e+00
  %221 = load double, ptr %23, align 8, !tbaa !23
  %222 = fdiv double %220, %221
  invoke void @vl_sift_calc_raw_descriptor(ptr noundef %201, ptr noundef %202, ptr noundef %206, i32 noundef %208, i32 noundef %210, double noundef %214, double noundef %218, double noundef %222, double noundef 0x3FF921FB54442D18)
          to label %223 unwind label %228

223:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %224

224:                                              ; preds = %261, %223
  %225 = load i32, ptr %34, align 4, !tbaa !9
  %226 = icmp slt i32 %225, 128
  br i1 %226, label %232, label %227

227:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %264

228:                                              ; preds = %264, %200, %191, %154
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %26, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 528, ptr %32) #8
  br label %280

232:                                              ; preds = %224
  %233 = load i64, ptr %18, align 8, !tbaa !21
  %234 = load i64, ptr %17, align 8, !tbaa !21
  %235 = mul i64 %233, %234
  %236 = load i32, ptr %34, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = add i64 %235, %237
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %238) #8
  %240 = load float, ptr %239, align 4, !tbaa !12
  %241 = fpext float %240 to double
  %242 = fcmp olt double %241, 5.000000e-01
  br i1 %242, label %243, label %253

243:                                              ; preds = %232
  %244 = load i64, ptr %18, align 8, !tbaa !21
  %245 = load i64, ptr %17, align 8, !tbaa !21
  %246 = mul i64 %244, %245
  %247 = load i32, ptr %34, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = add i64 %246, %248
  %250 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %249) #8
  %251 = load float, ptr %250, align 4, !tbaa !12
  %252 = fpext float %251 to double
  br label %254

253:                                              ; preds = %232
  br label %254

254:                                              ; preds = %253, %243
  %255 = phi double [ %252, %243 ], [ 5.000000e-01, %253 ]
  %256 = fptrunc double %255 to float
  %257 = getelementptr inbounds %"struct.vot::Vlfeature", ptr %32, i32 0, i32 4
  %258 = load i32, ptr %34, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [128 x float], ptr %257, i64 0, i64 %259
  store float %256, ptr %260, align 4, !tbaa !12
  br label %261

261:                                              ; preds = %254
  %262 = load i32, ptr %34, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %34, align 4, !tbaa !9
  br label %224, !llvm.loop !37

264:                                              ; preds = %227
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %265, ptr noundef nonnull align 4 dereferenceable(528) %32)
          to label %266 unwind label %228

266:                                              ; preds = %264
  call void @llvm.lifetime.end.p0(i64 528, ptr %32) #8
  br label %267

267:                                              ; preds = %266
  %268 = load i64, ptr %17, align 8, !tbaa !21
  %269 = add nsw i64 %268, 1
  store i64 %269, ptr %17, align 8, !tbaa !21
  br label %148, !llvm.loop !38

270:                                              ; preds = %148
  %271 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @vl_sift_delete(ptr noundef %271)
          to label %272 unwind label %143

272:                                              ; preds = %270
  %273 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @vl_covdet_delete(ptr noundef %273)
          to label %274 unwind label %143

274:                                              ; preds = %272
  %275 = load ptr, ptr %11, align 8, !tbaa !5
  %276 = icmp ne ptr %275, null
  br i1 %276, label %277, label %279

277:                                              ; preds = %274
  %278 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %278) #8
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %279

279:                                              ; preds = %277, %274
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  ret void

280:                                              ; preds = %228, %143
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  br label %281

281:                                              ; preds = %280, %139
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  br label %282

282:                                              ; preds = %281, %135
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  br label %283

283:                                              ; preds = %282, %131
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %26, align 8
  %286 = load i32, ptr %27, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare ptr @vl_covdet_new(i32 noundef) #4

declare void @vl_covdet_set_first_octave(ptr noundef, i64 noundef) #4

declare void @vl_covdet_set_peak_threshold(ptr noundef, double noundef) #4

declare void @vl_covdet_set_edge_threshold(ptr noundef, double noundef) #4

declare i32 @vl_covdet_put_image(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #4

declare void @vl_covdet_detect(ptr noundef) #4

declare void @vl_covdet_drop_features_outside(ptr noundef, double noundef) #4

declare void @vl_covdet_extract_affine_shape(ptr noundef) #4

declare void @vl_covdet_extract_orientations(ptr noundef) #4

declare i64 @vl_covdet_get_num_features(ptr noundef) #4

declare ptr @vl_covdet_get_features(ptr noundef) #4

declare ptr @vl_sift_new(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL18vl_sift_set_magnifP11_VlSiftFiltd(ptr noundef, double noundef) #6

declare i32 @vl_covdet_extract_patch_for_frame(ptr noundef, ptr noundef, i64 noundef, double noundef, double noundef, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

declare void @vl_imgradient_polar_f(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #4

declare void @vl_sift_calc_raw_descriptor(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, double noundef, double noundef, double noundef, double noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(528)) #2 align 2

declare void @vl_sift_delete(ptr noundef) #4

declare void @vl_covdet_delete(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !18, i64 8}
!17 = !{!"_ZTSN3vot11VlFeatParamE", !18, i64 0, !18, i64 8, !18, i64 16, !19, i64 24}
!18 = !{!"double", !7, i64 0}
!19 = !{!"_ZTSN3vot19LIBVOT_FEATURE_TYPEE", !7, i64 0}
!20 = !{!17, !18, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, i64 0}
!23 = !{!18, !18, i64 0}
!24 = !{!17, !18, i64 16}
!25 = !{!26, !13, i64 0}
!26 = !{!"_ZTS16_VlCovDetFeature", !27, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36}
!27 = !{!"_ZTS23_VlFrameOrientedEllipse", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!28 = !{!29, !13, i64 0}
!29 = !{!"_ZTSN3vot9VlfeatureE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !7, i64 16}
!30 = !{!26, !13, i64 4}
!31 = !{!29, !13, i64 4}
!32 = !{!26, !13, i64 36}
!33 = !{!29, !13, i64 8}
!34 = !{!26, !13, i64 32}
!35 = !{!29, !13, i64 12}
!36 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12, i64 12, i64 4, !12, i64 16, i64 4, !12, i64 20, i64 4, !12}
!37 = distinct !{!37, !15}
!38 = distinct !{!38, !15}


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

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"struct.vot::Vlfeature" = type { float, float, float, float, [128 x float] }
%struct._VlFrameOrientedEllipse = type { float, float, float, float, float, float }
%struct._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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 uwtable
define dso_local void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr nocapture noundef readonly %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef nonnull readonly align 8 dereferenceable(28) %4) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca %"class.std::allocator.2", align 1
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca %"class.std::allocator.2", align 1
  %12 = alloca %"struct.vot::Vlfeature", align 8
  %13 = alloca %struct._VlFrameOrientedEllipse, align 8
  %14 = mul nsw i32 %3, %2
  %15 = sext i32 %14 to i64
  %16 = shl nsw i64 %15, 2
  %17 = tail call noalias ptr @malloc(i64 noundef %16) #8
  %18 = icmp sgt i32 %14, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext nneg i32 %14 to i64
  %min.iters.check = icmp ult i32 %14, 8
  br i1 %min.iters.check, label %.lr.ph.preheader112, label %vector.ph

.lr.ph.preheader112:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %19 = getelementptr inbounds i8, ptr %0, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 4
  %wide.load = load <4 x i8>, ptr %19, align 1, !tbaa !5
  %wide.load111 = load <4 x i8>, ptr %20, align 1, !tbaa !5
  %21 = uitofp <4 x i8> %wide.load to <4 x float>
  %22 = uitofp <4 x i8> %wide.load111 to <4 x float>
  %23 = getelementptr inbounds float, ptr %17, i64 %index
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  store <4 x float> %21, ptr %23, align 4, !tbaa !8
  store <4 x float> %22, ptr %24, align 4, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %25 = icmp eq i64 %index.next, %n.vec
  br i1 %25, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader112

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %5
  %26 = tail call ptr @vl_covdet_new(i32 noundef 2)
  tail call void @vl_covdet_set_first_octave(ptr noundef %26, i64 noundef 0)
  %27 = getelementptr inbounds i8, ptr %4, i64 8
  %28 = load double, ptr %27, align 8, !tbaa !14
  %29 = fcmp ogt double %28, 0.000000e+00
  br i1 %29, label %34, label %35

.lr.ph:                                           ; preds = %.lr.ph.preheader112, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader112 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv
  %31 = load i8, ptr %30, align 1, !tbaa !5
  %32 = uitofp i8 %31 to float
  %33 = getelementptr inbounds float, ptr %17, i64 %indvars.iv
  store float %32, ptr %33, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

34:                                               ; preds = %._crit_edge
  tail call void @vl_covdet_set_peak_threshold(ptr noundef %26, double noundef %28)
  br label %35

35:                                               ; preds = %34, %._crit_edge
  %36 = load double, ptr %4, align 8, !tbaa !19
  %37 = fcmp ogt double %36, 0.000000e+00
  br i1 %37, label %38, label %39

38:                                               ; preds = %35
  tail call void @vl_covdet_set_edge_threshold(ptr noundef %26, double noundef %36)
  br label %39

39:                                               ; preds = %38, %35
  %40 = sext i32 %2 to i64
  %41 = sext i32 %3 to i64
  %42 = tail call i32 @vl_covdet_put_image(ptr noundef %26, ptr noundef %17, i64 noundef %40, i64 noundef %41)
  tail call void @vl_covdet_detect(ptr noundef %26)
  tail call void @vl_covdet_drop_features_outside(ptr noundef %26, double noundef 1.000000e+00)
  tail call void @vl_covdet_extract_affine_shape(ptr noundef %26)
  tail call void @vl_covdet_extract_orientations(ptr noundef %26)
  %43 = tail call i64 @vl_covdet_get_num_features(ptr noundef %26)
  %44 = tail call ptr @vl_covdet_get_features(ptr noundef %26)
  %45 = tail call ptr @vl_sift_new(i32 noundef 16, i32 noundef 16, i32 noundef 1, i32 noundef 3, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  %46 = shl i64 %43, 7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %46, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %47 unwind label %54

47:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #9
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 961, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %48 unwind label %56

48:                                               ; preds = %47
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #9
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 1922, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %49 unwind label %58

49:                                               ; preds = %48
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  %50 = getelementptr inbounds i8, ptr %4, i64 16
  %51 = load double, ptr %50, align 8, !tbaa !20
  %52 = fcmp ogt double %51, 0.000000e+00
  br i1 %52, label %53, label %62

53:                                               ; preds = %49
  call void @_ZL18vl_sift_set_magnifP11_VlSiftFiltd(ptr noundef %45, double noundef %51)
  br label %62

54:                                               ; preds = %39
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  br label %105

56:                                               ; preds = %47
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #9
  br label %104

58:                                               ; preds = %48
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  br label %103

60:                                               ; preds = %98, %._crit_edge104
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %102

62:                                               ; preds = %53, %49
  %sext = shl i64 %43, 32
  %63 = ashr exact i64 %sext, 32
  %64 = icmp sgt i64 %63, 0
  br i1 %64, label %.lr.ph103, label %._crit_edge104

.lr.ph103:                                        ; preds = %62
  %65 = getelementptr inbounds i8, ptr %12, i64 8
  %66 = getelementptr inbounds i8, ptr %12, i64 16
  br label %67

67:                                               ; preds = %.lr.ph103, %96
  %.090101 = phi i64 [ 0, %.lr.ph103 ], [ %97, %96 ]
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %12) #9
  %68 = getelementptr inbounds %struct._VlCovDetFeature, ptr %44, i64 %.090101
  %69 = load <2 x float>, ptr %68, align 4, !tbaa !8
  store <2 x float> %69, ptr %12, align 8, !tbaa !8
  %70 = getelementptr inbounds i8, ptr %68, i64 32
  %71 = load <2 x float>, ptr %70, align 4, !tbaa !8
  %72 = shufflevector <2 x float> %71, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  store <2 x float> %72, ptr %65, align 8, !tbaa !8
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(24) %68, i64 24, i1 false), !tbaa.struct !21
  %74 = invoke i32 @vl_covdet_extract_patch_for_frame(ptr noundef %26, ptr noundef nonnull %73, i64 noundef 15, double noundef 7.500000e+00, double noundef 1.000000e+00, ptr noundef nonnull byval(%struct._VlFrameOrientedEllipse) align 8 %13)
          to label %75 unwind label %84

75:                                               ; preds = %67
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #9
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 1) #9
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0) #9
  invoke void @vl_imgradient_polar_f(ptr noundef nonnull %76, ptr noundef nonnull %77, i64 noundef 2, i64 noundef 62, ptr noundef nonnull %78, i64 noundef 31, i64 noundef 31, i64 noundef 31)
          to label %79 unwind label %84

79:                                               ; preds = %75
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #9
  %81 = shl i64 %.090101, 7
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %81) #9
  invoke void @vl_sift_calc_raw_descriptor(ptr noundef %45, ptr noundef nonnull %80, ptr noundef nonnull %82, i32 noundef 31, i32 noundef 31, double noundef 1.500000e+01, double noundef 1.500000e+01, double noundef 2.000000e+00, double noundef 0x3FF921FB54442D18)
          to label %.preheader unwind label %84

83:                                               ; preds = %93
  invoke void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(528) %12)
          to label %96 unwind label %84

84:                                               ; preds = %83, %79, %75, %67
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %12) #9
  br label %102

.preheader:                                       ; preds = %79, %93
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %93 ], [ 0, %79 ]
  %86 = or disjoint i64 %81, %indvars.iv106
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %86) #9
  %88 = load float, ptr %87, align 4, !tbaa !8
  %89 = fcmp olt float %88, 5.000000e-01
  br i1 %89, label %90, label %93

90:                                               ; preds = %.preheader
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %86) #9
  %92 = load float, ptr %91, align 4, !tbaa !8
  br label %93

93:                                               ; preds = %.preheader, %90
  %94 = phi float [ %92, %90 ], [ 5.000000e-01, %.preheader ]
  %95 = getelementptr inbounds [128 x float], ptr %66, i64 0, i64 %indvars.iv106
  store float %94, ptr %95, align 4, !tbaa !8
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next107, 128
  br i1 %exitcond109.not, label %83, label %.preheader, !llvm.loop !22

96:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %12) #9
  %97 = add nuw nsw i64 %.090101, 1
  %exitcond110.not = icmp eq i64 %97, %63
  br i1 %exitcond110.not, label %._crit_edge104, label %67, !llvm.loop !23

._crit_edge104:                                   ; preds = %96, %62
  invoke void @vl_sift_delete(ptr noundef %45)
          to label %98 unwind label %60

98:                                               ; preds = %._crit_edge104
  invoke void @vl_covdet_delete(ptr noundef %26)
          to label %99 unwind label %60

99:                                               ; preds = %98
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %101, label %100

100:                                              ; preds = %99
  call void @free(ptr noundef nonnull %17) #9
  br label %101

101:                                              ; preds = %100, %99
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  ret void

102:                                              ; preds = %84, %60
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %61, %60 ]
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #9
  br label %103

103:                                              ; preds = %102, %58
  %.pn.pn = phi { ptr, i32 } [ %.pn, %102 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %104

104:                                              ; preds = %103, %56
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %103 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %105

105:                                              ; preds = %104, %54
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %104 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare ptr @vl_covdet_new(i32 noundef) local_unnamed_addr #4

declare void @vl_covdet_set_first_octave(ptr noundef, i64 noundef) local_unnamed_addr #4

declare void @vl_covdet_set_peak_threshold(ptr noundef, double noundef) local_unnamed_addr #4

declare void @vl_covdet_set_edge_threshold(ptr noundef, double noundef) local_unnamed_addr #4

declare i32 @vl_covdet_put_image(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

declare void @vl_covdet_detect(ptr noundef) local_unnamed_addr #4

declare void @vl_covdet_drop_features_outside(ptr noundef, double noundef) local_unnamed_addr #4

declare void @vl_covdet_extract_affine_shape(ptr noundef) local_unnamed_addr #4

declare void @vl_covdet_extract_orientations(ptr noundef) local_unnamed_addr #4

declare i64 @vl_covdet_get_num_features(ptr noundef) local_unnamed_addr #4

declare ptr @vl_covdet_get_features(ptr noundef) local_unnamed_addr #4

declare ptr @vl_sift_new(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL18vl_sift_set_magnifP11_VlSiftFiltd(ptr noundef, double noundef) local_unnamed_addr #6

declare i32 @vl_covdet_extract_patch_for_frame(ptr noundef, ptr noundef, i64 noundef, double noundef, double noundef, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

declare void @vl_imgradient_polar_f(ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

declare void @vl_sift_calc_raw_descriptor(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(528)) local_unnamed_addr #2 align 2

declare void @vl_sift_delete(ptr noundef) local_unnamed_addr #4

declare void @vl_covdet_delete(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 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 #6 = { inlinehint mustprogress 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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { nounwind allocsize(0) }
attributes #9 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !6, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = !{!15, !16, i64 8}
!15 = !{!"_ZTSN3vot11VlFeatParamE", !16, i64 0, !16, i64 8, !16, i64 16, !17, i64 24}
!16 = !{!"double", !6, i64 0}
!17 = !{!"_ZTSN3vot19LIBVOT_FEATURE_TYPEE", !6, i64 0}
!18 = distinct !{!18, !11, !13, !12}
!19 = !{!15, !16, i64 0}
!20 = !{!15, !16, i64 16}
!21 = !{i64 0, i64 4, !8, i64 4, i64 4, !8, i64 8, i64 4, !8, i64 12, i64 4, !8, i64 16, i64 4, !8, i64 20, i64 4, !8}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}


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