; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl" }
%"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl" = type { %"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.vot::VlFeatParam" = type <{ double, double, double, i32, [4 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3vot20Vlfeature2LibvotSiftERKSt6vectorINS_9VlfeatureESaIS1_EEPKhiiiRNS_8SiftDataE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #0

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(28)) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vot18VlFeatureDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(28)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3vot12RunVlFeatureEPhiiiRNS_8SiftDataERKNS_11VlFeatParamE(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(28) %5) #0 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !5
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 3
  br i1 %26, label %27, label %75

27:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = mul nsw i32 %28, %29
  %31 = sext i32 %30 to i64
  store i64 %31, ptr %15, align 8, !tbaa !11
  %32 = load i64, ptr %15, align 8, !tbaa !11
  %33 = call noalias noundef nonnull ptr @_Znam(i64 noundef %32) #9
  store ptr %33, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !11
  br label %34

34:                                               ; preds = %69, %27
  %35 = load i64, ptr %16, align 8, !tbaa !11
  %36 = load i64, ptr %15, align 8, !tbaa !11
  %37 = icmp ult i64 %35, %36
  br i1 %37, label %38, label %74

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i64, ptr %17, align 8, !tbaa !11
  %41 = add i64 %40, 2
  %42 = getelementptr inbounds i8, ptr %39, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !13
  %44 = zext i8 %43 to i32
  %45 = sitofp i32 %44 to float
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %17, align 8, !tbaa !11
  %48 = add i64 %47, 1
  %49 = getelementptr inbounds i8, ptr %46, i64 %48
  %50 = load i8, ptr %49, align 1, !tbaa !13
  %51 = zext i8 %50 to i32
  %52 = sitofp i32 %51 to float
  %53 = fmul float 0x3FE362CBA0000000, %52
  %54 = call float @llvm.fmuladd.f32(float 0x3FBAC32220000000, float %45, float %53)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load i64, ptr %17, align 8, !tbaa !11
  %57 = getelementptr inbounds i8, ptr %55, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !13
  %59 = zext i8 %58 to i32
  %60 = sitofp i32 %59 to float
  %61 = call float @llvm.fmuladd.f32(float 0x3FD289A020000000, float %60, float %54)
  %62 = fptosi float %61 to i32
  store i32 %62, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 255, ptr %19, align 4, !tbaa !9
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = trunc i32 %64 to i8
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load i64, ptr %16, align 8, !tbaa !11
  %68 = getelementptr inbounds i8, ptr %66, i64 %67
  store i8 %65, ptr %68, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %69

69:                                               ; preds = %38
  %70 = load i64, ptr %16, align 8, !tbaa !11
  %71 = add i64 %70, 1
  store i64 %71, ptr %16, align 8, !tbaa !11
  %72 = load i64, ptr %17, align 8, !tbaa !11
  %73 = add i64 %72, 3
  store i64 %73, ptr %17, align 8, !tbaa !11
  br label %34, !llvm.loop !14

74:                                               ; preds = %34
  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
  br label %77

75:                                               ; preds = %6
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %76, ptr %14, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %75, %74
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.vot::VlFeatParam", ptr %78, i32 0, i32 3
  %80 = load i32, ptr %79, align 8, !tbaa !16
  switch i32 %80, label %97 [
    i32 1, label %81
    i32 2, label %91
  ]

81:                                               ; preds = %77
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN3vot18VlFeatureDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef %82, ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %83, i32 noundef %84, ptr noundef nonnull align 8 dereferenceable(28) %85)
          to label %86 unwind label %87

86:                                               ; preds = %81
  br label %100

87:                                               ; preds = %106, %103, %97, %91, %81
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %21, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %22, align 4
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %130

91:                                               ; preds = %77
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef %92, ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %93, i32 noundef %94, ptr noundef nonnull align 8 dereferenceable(28) %95)
          to label %96 unwind label %87

96:                                               ; preds = %91
  br label %100

97:                                               ; preds = %77
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
          to label %99 unwind label %87

99:                                               ; preds = %97
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %23, align 4
  br label %128

100:                                              ; preds = %96, %86
  %101 = call noundef i64 @_ZNKSt6vectorIN3vot9VlfeatureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %102 = icmp eq i64 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %100
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %105 unwind label %87

105:                                              ; preds = %103
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %23, align 4
  br label %128

106:                                              ; preds = %100
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %10, align 4, !tbaa !9
  %110 = load i32, ptr %11, align 4, !tbaa !9
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = invoke noundef zeroext i1 @_ZN3vot20Vlfeature2LibvotSiftERKSt6vectorINS_9VlfeatureESaIS1_EEPKhiiiRNS_8SiftDataE(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef %107, i32 noundef %108, i32 noundef %109, i32 noundef %110, ptr noundef nonnull align 8 dereferenceable(40) %111)
          to label %113 unwind label %87

113:                                              ; preds = %106
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %124

116:                                              ; preds = %113
  %117 = load i32, ptr %11, align 4, !tbaa !9
  %118 = icmp eq i32 %117, 3
  br i1 %118, label %119, label %124

119:                                              ; preds = %116
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  call void @_ZdaPv(ptr noundef %120) #10
  br label %123

123:                                              ; preds = %122, %119
  br label %124

124:                                              ; preds = %123, %116, %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %125 = call noundef i64 @_ZNKSt6vectorIN3vot9VlfeatureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %126 = trunc i64 %125 to i32
  store i32 %126, ptr %24, align 4, !tbaa !9
  %127 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %127, ptr %7, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %128

128:                                              ; preds = %124, %105, %99
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %129 = load i32, ptr %7, align 4
  ret i32 %129

130:                                              ; preds = %87
  %131 = load ptr, ptr %21, align 8
  %132 = load i32, ptr %22, align 4
  %133 = insertvalue { ptr, i32 } poison, ptr %131, 0
  %134 = insertvalue { ptr, i32 } %133, i32 %132, 1
  resume { ptr, i32 } %134
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nobuiltin 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 = { inlinehint 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nobuiltin 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 = { builtin allocsize(0) }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !19, i64 24}
!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}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl" }
%"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl" = type { %"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vot::Vlfeature, std::allocator<vot::Vlfeature>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3vot20Vlfeature2LibvotSiftERKSt6vectorINS_9VlfeatureESaIS1_EEPKhiiiRNS_8SiftDataE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vot18VlFeatureDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3vot12RunVlFeatureEPhiiiRNS_8SiftDataERKNS_11VlFeatParamE(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(28) %5) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = icmp eq i32 %3, 3
  br i1 %10, label %11, label %.loopexit

11:                                               ; preds = %6
  %12 = mul nsw i32 %2, %1
  %13 = sext i32 %12 to i64
  %14 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %13) #8
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %11, %.lr.ph
  %.03942 = phi i64 [ %32, %.lr.ph ], [ 0, %11 ]
  %.04041 = phi i64 [ %33, %.lr.ph ], [ 0, %11 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %15 = getelementptr i8, ptr %0, i64 %.04041
  %16 = getelementptr i8, ptr %15, i64 2
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %18 = uitofp i8 %17 to float
  %19 = getelementptr i8, ptr %15, i64 1
  %20 = load i8, ptr %19, align 1, !tbaa !5
  %21 = uitofp i8 %20 to float
  %22 = fmul float %21, 0x3FE362CBA0000000
  %23 = call float @llvm.fmuladd.f32(float %18, float 0x3FBAC32220000000, float %22)
  %24 = load i8, ptr %15, align 1, !tbaa !5
  %25 = uitofp i8 %24 to float
  %26 = call float @llvm.fmuladd.f32(float %25, float 0x3FD289A020000000, float %23)
  %27 = fptosi float %26 to i32
  store i32 %27, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 255, ptr %8, align 4, !tbaa !8
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %29 = load i32, ptr %28, align 4, !tbaa !8
  %30 = trunc i32 %29 to i8
  %31 = getelementptr inbounds i8, ptr %14, i64 %.03942
  store i8 %30, ptr %31, align 1, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  %32 = add nuw i64 %.03942, 1
  %33 = add i64 %.04041, 3
  %exitcond.not = icmp eq i64 %32, %13
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !10

.loopexit:                                        ; preds = %.lr.ph, %11, %6
  %.038 = phi ptr [ %0, %6 ], [ %14, %11 ], [ %14, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %34 = getelementptr inbounds i8, ptr %5, i64 24
  %35 = load i32, ptr %34, align 8, !tbaa !12
  switch i32 %35, label %.invoke [
    i32 1, label %36
    i32 2, label %39
  ]

36:                                               ; preds = %.loopexit
  invoke void @_ZN3vot18VlFeatureDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef %.038, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %40 unwind label %37

37:                                               ; preds = %.invoke, %46, %39, %36
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  resume { ptr, i32 } %38

39:                                               ; preds = %.loopexit
  invoke void @_ZN3vot20VlCovariantDetectionEPKhRSt6vectorINS_9VlfeatureESaIS3_EEiiRKNS_11VlFeatParamE(ptr noundef %.038, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %40 unwind label %37

40:                                               ; preds = %39, %36
  %41 = call noundef i64 @_ZNKSt6vectorIN3vot9VlfeatureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %42 = icmp eq i64 %41, 0
  br i1 %42, label %.invoke, label %46

.invoke:                                          ; preds = %40, %.loopexit
  %43 = phi ptr [ @_ZSt4cerr, %.loopexit ], [ @_ZSt4cout, %40 ]
  %44 = phi ptr [ @.str.1, %.loopexit ], [ @.str.2, %40 ]
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull %44)
          to label %54 unwind label %37

46:                                               ; preds = %40
  %47 = invoke noundef zeroext i1 @_ZN3vot20Vlfeature2LibvotSiftERKSt6vectorINS_9VlfeatureESaIS1_EEPKhiiiRNS_8SiftDataE(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %48 unwind label %37

48:                                               ; preds = %46
  %49 = icmp ne ptr %.038, null
  %or.cond = and i1 %10, %49
  br i1 %or.cond, label %50, label %51

50:                                               ; preds = %48
  call void @_ZdaPv(ptr noundef nonnull %.038) #10
  br label %51

51:                                               ; preds = %50, %48
  %52 = call noundef i64 @_ZNKSt6vectorIN3vot9VlfeatureESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %53 = trunc i64 %52 to i32
  br label %54

54:                                               ; preds = %.invoke, %51
  %.0 = phi i32 [ %53, %51 ], [ -1, %.invoke ]
  call void @_ZNSt6vectorIN3vot9VlfeatureESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #7

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nobuiltin 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 = { inlinehint 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 #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nobuiltin 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 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !15, i64 24}
!13 = !{!"_ZTSN3vot11VlFeatParamE", !14, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"double", !6, i64 0}
!15 = !{!"_ZTSN3vot19LIBVOT_FEATURE_TYPEE", !6, i64 0}


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