; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor/CornerDetecto_8ed36abb (IfSaIfEEi)

; 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.ImageContent = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; 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
declare dso_local void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116), float noundef, float noundef, float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16CornerDescriptor7setTypeEi(ptr noundef nonnull align 8 dereferenceable(116), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z15checkMaskHarrisP12ImageContentS0_iif(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) #5

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

25:                                               ; preds = %138, %6
  %26 = load i32, ptr %18, align 4, !tbaa !11
  %27 = load i32, ptr %17, align 4, !tbaa !11
  %28 = add i32 %26, %27
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %29)
  %31 = icmp ult i32 %28, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %25
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %141

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %34 = load i32, ptr %17, align 4, !tbaa !11
  store i32 %34, ptr %20, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %134, %33
  %36 = load i32, ptr %20, align 4, !tbaa !11
  %37 = load i32, ptr %17, align 4, !tbaa !11
  %38 = add i32 %36, %37
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %39)
  %41 = icmp ult i32 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %35
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %137

43:                                               ; preds = %35
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.ImageContent, ptr %44, i32 0, i32 4
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load i32, ptr %18, align 4, !tbaa !11
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %46, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = load i32, ptr %20, align 4, !tbaa !11
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds float, ptr %50, i64 %52
  %54 = load float, ptr %53, align 4, !tbaa !9
  %55 = fcmp ogt float %54, 0.000000e+00
  br i1 %55, label %56, label %133

56:                                               ; preds = %43
  %57 = load i32, ptr %16, align 4, !tbaa !11
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %16, align 4, !tbaa !11
  %59 = load float, ptr %10, align 4, !tbaa !9
  store float %59, ptr %14, align 4, !tbaa !9
  store i32 -1, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %60

60:                                               ; preds = %125, %56
  %61 = load i32, ptr %21, align 4, !tbaa !11
  %62 = zext i32 %61 to i64
  %63 = call noundef i64 @_ZNKSt6vectorIP12ImageContentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %128

66:                                               ; preds = %60
  %67 = load i32, ptr %21, align 4, !tbaa !11
  %68 = zext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %68) #8
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load i32, ptr %20, align 4, !tbaa !11
  %73 = load i32, ptr %18, align 4, !tbaa !11
  %74 = load float, ptr %10, align 4, !tbaa !9
  %75 = call noundef i32 @_Z15checkMaskHarrisP12ImageContentS0_iif(ptr noundef %70, ptr noundef %71, i32 noundef %72, i32 noundef %73, float noundef %74)
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %124

77:                                               ; preds = %66
  %78 = load i32, ptr %21, align 4, !tbaa !11
  %79 = zext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %79) #8
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %class.ImageContent, ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = load i32, ptr %18, align 4, !tbaa !11
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds ptr, ptr %83, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load i32, ptr %20, align 4, !tbaa !11
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  %91 = load float, ptr %90, align 4, !tbaa !9
  store float %91, ptr %14, align 4, !tbaa !9
  %92 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %92, ptr %15, align 4, !tbaa !11
  %93 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #9
  %94 = load i32, ptr %20, align 4, !tbaa !11
  %95 = uitofp i32 %94 to float
  %96 = load i32, ptr %18, align 4, !tbaa !11
  %97 = uitofp i32 %96 to float
  %98 = load i32, ptr %15, align 4, !tbaa !11
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %99) #8
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds %class.ImageContent, ptr %101, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = load i32, ptr %18, align 4, !tbaa !11
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = load i32, ptr %20, align 4, !tbaa !11
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %107, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !9
  %112 = load i32, ptr %15, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %113) #8
  %115 = load float, ptr %114, align 4, !tbaa !9
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %93, float noundef %95, float noundef %97, float noundef %111, float noundef %115)
          to label %116 unwind label %120

116:                                              ; preds = %77
  store ptr %93, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN16CornerDescriptor7setTypeEi(ptr noundef nonnull align 8 dereferenceable(116) %117, i32 noundef %118)
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 8 dereferenceable(8) %13)
  br label %124

120:                                              ; preds = %77
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %22, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %23, align 4
  call void @_ZdlPvm(ptr noundef %93, i64 noundef 120) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %146

124:                                              ; preds = %116, %66
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %21, align 4, !tbaa !11
  %127 = add i32 %126, 1
  store i32 %127, ptr %21, align 4, !tbaa !11
  br label %60, !llvm.loop !15

128:                                              ; preds = %65
  %129 = load i32, ptr %15, align 4, !tbaa !11
  %130 = icmp ne i32 %129, -1
  br i1 %130, label %131, label %132

131:                                              ; preds = %128
  br label %132

132:                                              ; preds = %131, %128
  br label %133

133:                                              ; preds = %132, %43
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %20, align 4, !tbaa !11
  %136 = add i32 %135, 1
  store i32 %136, ptr %20, align 4, !tbaa !11
  br label %35, !llvm.loop !17

137:                                              ; preds = %42
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %18, align 4, !tbaa !11
  %140 = add i32 %139, 1
  store i32 %140, ptr %18, align 4, !tbaa !11
  br label %25, !llvm.loop !18

141:                                              ; preds = %32
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
  %143 = load i32, ptr %16, align 4, !tbaa !11
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %142, i32 noundef %143)
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  ret void

146:                                              ; preds = %120
  %147 = load ptr, ptr %22, align 8
  %148 = load i32, ptr %23, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150
}

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 = { 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 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 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS12ImageContent", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, 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) #0

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

; 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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; 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 #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116), float noundef, float noundef, float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16CornerDescriptor7setTypeEi(ptr noundef nonnull align 8 dereferenceable(116), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z15checkMaskHarrisP12ImageContentS0_iif(ptr noundef, ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11findMaxMaskSt6vectorIP12ImageContentSaIS1_EES1_RS_IP16CornerDescriptorSaIS5_EEfS_IfSaIfEEi(ptr noundef %0, ptr noundef nonnull %1, ptr noundef nonnull align 8 dereferenceable(24) %2, float noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %8 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %9 = icmp ugt i32 %8, 10
  br i1 %9, label %.preheader.lr.ph, label %._crit_edge51

.preheader.lr.ph:                                 ; preds = %6
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %indvars.iv55 = phi i64 [ 5, %.preheader.lr.ph ], [ %indvars.iv.next56, %._crit_edge ]
  %.04049 = phi i32 [ 0, %.preheader.lr.ph ], [ %.141.lcssa, %._crit_edge ]
  %11 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %12 = icmp ugt i32 %11, 10
  br i1 %12, label %.lr.ph48, label %._crit_edge

.lr.ph48:                                         ; preds = %.preheader
  %13 = trunc nuw i64 %indvars.iv55 to i32
  %14 = uitofp i32 %13 to float
  br label %22

._crit_edge51:                                    ; preds = %._crit_edge, %6
  %.040.lcssa = phi i32 [ 0, %6 ], [ %.141.lcssa, %._crit_edge ]
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef %.040.lcssa)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  ret void

._crit_edge:                                      ; preds = %.loopexit, %.preheader
  %.141.lcssa = phi i32 [ %.04049, %.preheader ], [ %.2, %.loopexit ]
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %18 = add nuw nsw i64 %indvars.iv55, 6
  %19 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %20 = zext i32 %19 to i64
  %21 = icmp ult i64 %18, %20
  br i1 %21, label %.preheader, label %._crit_edge51, !llvm.loop !5

22:                                               ; preds = %.lr.ph48, %.loopexit
  %indvars.iv = phi i64 [ 5, %.lr.ph48 ], [ %indvars.iv.next, %.loopexit ]
  %.14146 = phi i32 [ %.04049, %.lr.ph48 ], [ %.2, %.loopexit ]
  %23 = load ptr, ptr %10, align 8, !tbaa !7
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv55
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds float, ptr %25, i64 %indvars.iv
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = fcmp ogt float %27, 0.000000e+00
  br i1 %28, label %29, label %.loopexit

29:                                               ; preds = %22
  %30 = add nsw i32 %.14146, 1
  %31 = call noundef i64 @_ZNKSt6vectorIP12ImageContentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %.not53 = icmp eq i64 %31, 0
  br i1 %.not53, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %29
  %32 = trunc nuw i64 %indvars.iv to i32
  %33 = uitofp i32 %32 to float
  br label %34

34:                                               ; preds = %.lr.ph, %56
  %35 = phi i64 [ 0, %.lr.ph ], [ %58, %56 ]
  %.03745 = phi i32 [ 0, %.lr.ph ], [ %57, %56 ]
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %35) #8
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = call noundef i32 @_Z15checkMaskHarrisP12ImageContentS0_iif(ptr noundef %37, ptr noundef nonnull %1, i32 noundef %32, i32 noundef %13, float noundef %3)
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %56, label %39

39:                                               ; preds = %34
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %35) #8
  %41 = call noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #9
  %42 = sext i32 %.03745 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ImageContentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %42) #8
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !7
  %47 = getelementptr inbounds ptr, ptr %46, i64 %indvars.iv55
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds float, ptr %48, i64 %indvars.iv
  %50 = load float, ptr %49, align 4, !tbaa !14
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42) #8
  %52 = load float, ptr %51, align 4, !tbaa !14
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %41, float noundef %33, float noundef %14, float noundef %50, float noundef %52)
          to label %53 unwind label %54

53:                                               ; preds = %39
  store ptr %41, ptr %7, align 8, !tbaa !13
  call void @_ZN16CornerDescriptor7setTypeEi(ptr noundef nonnull align 8 dereferenceable(116) %41, i32 noundef %5)
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %56

54:                                               ; preds = %39
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %41, i64 noundef 120) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  resume { ptr, i32 } %55

56:                                               ; preds = %34, %53
  %57 = add i32 %.03745, 1
  %58 = zext i32 %57 to i64
  %59 = call noundef i64 @_ZNKSt6vectorIP12ImageContentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %60 = icmp ugt i64 %59, %58
  br i1 %60, label %34, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %56, %29, %22
  %.2 = phi i32 [ %.14146, %22 ], [ %30, %29 ], [ %30, %56 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %61 = add nuw nsw i64 %indvars.iv, 6
  %62 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %63 = zext i32 %62 to i64
  %64 = icmp ult i64 %61, %63
  br i1 %64, label %22, label %._crit_edge, !llvm.loop !17
}

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 = { 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 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 = { "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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !12, i64 16}
!8 = !{!"_ZTS12ImageContent", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !10, i64 0}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass