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

; 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<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl" }
%"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl" = type { %"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef, ptr noundef, float noundef, float noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13selectBestOneRSt6vectorIP16CornerDescriptorSaIS1_EES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16thresholdCornersRSt6vectorIP16CornerDescriptorSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19selectSimilarPointsRSt6vectorIP16CornerDescriptorSaIS1_EES_IfSaIfEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  br label %31

31:                                               ; preds = %210, %2
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef 0) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %34 unwind label %51

34:                                               ; preds = %31
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #5
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %13, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr %40)
          to label %42 unwind label %55

42:                                               ; preds = %34
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %41, ptr %43, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  store i32 -1, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %83, %42
  %45 = load i32, ptr %16, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %48 = sub i64 %47, 1
  %49 = icmp ult i64 %46, %48
  br i1 %49, label %59, label %50

50:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %86

51:                                               ; preds = %257, %236, %233, %231, %230, %228, %225, %223, %221, %218, %216, %214, %189, %186, %158, %118, %90, %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  br label %261

55:                                               ; preds = %34
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %261

59:                                               ; preds = %44
  %60 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %61 = sub i64 %60, 1
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %61) #5
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = invoke noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %63)
          to label %65 unwind label %78

65:                                               ; preds = %59
  %66 = load i32, ptr %16, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %67) #5
  %69 = load float, ptr %68, align 4, !tbaa !11
  %70 = fsub float %64, %69
  %71 = invoke noundef float @_ZSt4fabsf(float noundef %70)
          to label %72 unwind label %78

72:                                               ; preds = %65
  %73 = fpext float %71 to double
  %74 = fcmp olt double %73, 1.000000e-02
  br i1 %74, label %75, label %82

75:                                               ; preds = %72
  %76 = load i32, ptr %16, align 4, !tbaa !9
  %77 = add i32 %76, 1
  store i32 %77, ptr %9, align 4, !tbaa !9
  br label %82

78:                                               ; preds = %65, %59
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %261

82:                                               ; preds = %75, %72
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = add i32 %84, 1
  store i32 %85, ptr %16, align 4, !tbaa !9
  br label %44, !llvm.loop !13

86:                                               ; preds = %50
  store i32 1, ptr %10, align 4, !tbaa !9
  %87 = load i32, ptr %9, align 4, !tbaa !9
  %88 = icmp ne i32 %87, -1
  br i1 %88, label %89, label %189

89:                                               ; preds = %86
  br label %90

90:                                               ; preds = %180, %89
  %91 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %92 = sub i64 %91, 1
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %92) #5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %95)
          to label %96 unwind label %51

96:                                               ; preds = %90
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %98) #5
  %100 = load float, ptr %99, align 4, !tbaa !11
  %101 = load i32, ptr %9, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %102) #5
  %104 = load float, ptr %103, align 4, !tbaa !11
  %105 = fpext float %104 to double
  %106 = fmul double 8.000000e-01, %105
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %108) #5
  %110 = load float, ptr %109, align 4, !tbaa !11
  %111 = fpext float %110 to double
  %112 = fmul double %106, %111
  %113 = fptrunc double %112 to float
  %114 = invoke noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef %94, ptr noundef %17, float noundef %100, float noundef %113)
          to label %115 unwind label %145

115:                                              ; preds = %96
  store i32 %114, ptr %8, align 4, !tbaa !9
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = icmp ne i32 %116, -1
  br i1 %117, label %118, label %155

118:                                              ; preds = %115
  store i32 0, ptr %10, align 4, !tbaa !9
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %123 unwind label %51

123:                                              ; preds = %118
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #5
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %129) #5
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  %132 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %18, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8
  %134 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %124, ptr %133)
          to label %135 unwind label %149

135:                                              ; preds = %123
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %134, ptr %136, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %139 = sub i64 %138, 1
  %140 = trunc i64 %139 to i32
  %141 = icmp slt i32 %137, %140
  br i1 %141, label %142, label %153

142:                                              ; preds = %135
  %143 = load i32, ptr %9, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %9, align 4, !tbaa !9
  br label %154

145:                                              ; preds = %96
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %11, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %12, align 4
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %261

149:                                              ; preds = %123
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %11, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %261

153:                                              ; preds = %135
  store i32 -1, ptr %8, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %153, %142
  br label %179

155:                                              ; preds = %115
  %156 = load i32, ptr %10, align 4, !tbaa !9
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %178

158:                                              ; preds = %155
  %159 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %160 = sub i64 %159, 1
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %160) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %161)
          to label %162 unwind label %51

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %163 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %164 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  %165 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %166 = sub i64 %165, 1
  %167 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %166) #5
  %168 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %167, ptr %168, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  %169 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %22, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8
  %171 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %170)
          to label %172 unwind label %174

172:                                              ; preds = %162
  %173 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %171, ptr %173, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %178

174:                                              ; preds = %162
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %11, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %261

178:                                              ; preds = %172, %155
  br label %179

179:                                              ; preds = %178, %154
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = icmp ne i32 %181, -1
  br i1 %182, label %90, label %183, !llvm.loop !15

183:                                              ; preds = %180
  %184 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %185 = icmp ugt i64 %184, 0
  br i1 %185, label %186, label %188

186:                                              ; preds = %183
  invoke void @_Z13selectBestOneRSt6vectorIP16CornerDescriptorSaIS1_EES4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %187 unwind label %51

187:                                              ; preds = %186
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %188

188:                                              ; preds = %187, %183
  br label %209

189:                                              ; preds = %86
  %190 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %191 = sub i64 %190, 1
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %191) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %193 unwind label %51

193:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %194 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  %196 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %197 = sub i64 %196, 1
  %198 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %197) #5
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  %200 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %26, i32 0, i32 0
  %201 = load ptr, ptr %200, align 8
  %202 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %201)
          to label %203 unwind label %205

203:                                              ; preds = %193
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %202, ptr %204, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %209

205:                                              ; preds = %193
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %11, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %261

209:                                              ; preds = %203, %188
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %211) #5
  %213 = icmp ugt i64 %212, 0
  br i1 %213, label %31, label %214, !llvm.loop !16

214:                                              ; preds = %210
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %216 unwind label %51

216:                                              ; preds = %214
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %218 unwind label %51

218:                                              ; preds = %216
  %219 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %217, i64 noundef %219)
          to label %221 unwind label %51

221:                                              ; preds = %218
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %220, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %223 unwind label %51

223:                                              ; preds = %221
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %225 unwind label %51

225:                                              ; preds = %223
  %226 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %224, i64 noundef %226)
          to label %228 unwind label %51

228:                                              ; preds = %225
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %230 unwind label %51

230:                                              ; preds = %228
  invoke void @_Z16thresholdCornersRSt6vectorIP16CornerDescriptorSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %231 unwind label %51

231:                                              ; preds = %230
  %232 = 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 %233 unwind label %51

233:                                              ; preds = %231
  %234 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %232, i64 noundef %234)
          to label %236 unwind label %51

236:                                              ; preds = %233
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %235, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %238 unwind label %51

238:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %239

239:                                              ; preds = %250, %238
  %240 = load i32, ptr %30, align 4, !tbaa !9
  %241 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %242 = trunc i64 %241 to i32
  %243 = icmp slt i32 %240, %242
  br i1 %243, label %245, label %244

244:                                              ; preds = %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %257

245:                                              ; preds = %239
  %246 = load i32, ptr %30, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %247) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %248)
          to label %249 unwind label %253

249:                                              ; preds = %245
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %30, align 4, !tbaa !9
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %30, align 4, !tbaa !9
  br label %239, !llvm.loop !17

253:                                              ; preds = %245
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %11, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %261

257:                                              ; preds = %244
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %258 = load ptr, ptr %3, align 8, !tbaa !5
  %259 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %258, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %260 unwind label %51

260:                                              ; preds = %257
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret void

261:                                              ; preds = %253, %205, %174, %149, %145, %78, %55, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %11, align 8
  %264 = load i32, ptr %12, align 4
  %265 = insertvalue { ptr, i32 } poison, ptr %263, 0
  %266 = insertvalue { ptr, i32 } %265, i32 %264, 1
  resume { ptr, i32 } %266
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24), ptr) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 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) #3 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)) #4

; 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
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 = { 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 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; 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<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl" }
%"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl" = type { %"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CornerDescriptor *, std::allocator<CornerDescriptor *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fabsf(float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef, ptr noundef, float noundef, float noundef) local_unnamed_addr #3

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

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16thresholdCornersRSt6vectorIP16CornerDescriptorSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19selectSimilarPointsRSt6vectorIP16CornerDescriptorSaIS1_EES_IfSaIfEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %18

18:                                               ; preds = %139, %2
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %20 unwind label %.loopexit.split-lp.loopexit

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %21 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %21, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %22 = load ptr, ptr %6, align 8
  %23 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %22)
          to label %24 unwind label %58

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %25 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %.not66 = icmp eq i64 %25, 1
  br i1 %.not66, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %.not = icmp eq i32 %.1, -1
  br i1 %.not, label %._crit_edge.thread, label %.preheader52.preheader

.preheader52.preheader:                           ; preds = %._crit_edge
  %26 = sext i32 %.1 to i64
  %27 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %28 = add i64 %27, -1
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %28) #5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %31 unwind label %.loopexit.loopexit.split-lp

31:                                               ; preds = %.preheader52.preheader
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %26) #5
  %33 = load float, ptr %32, align 4, !tbaa !9
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %26) #5
  %35 = load float, ptr %34, align 4, !tbaa !9
  %36 = fpext float %35 to double
  %37 = fmul double %36, 8.000000e-01
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %26) #5
  %39 = load float, ptr %38, align 4, !tbaa !9
  %40 = fpext float %39 to double
  %41 = fmul double %37, %40
  %42 = fptrunc double %41 to float
  %43 = invoke noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef %30, ptr noundef nonnull %8, float noundef %33, float noundef %42)
          to label %44 unwind label %.loopexit.split-lp74

44:                                               ; preds = %31
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not41.peel.not = icmp eq i32 %43, -1
  br i1 %.not41.peel.not, label %.loopexit77.thread, label %45

45:                                               ; preds = %44
  %46 = sext i32 %43 to i64
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %46) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %48 unwind label %.loopexit.loopexit.split-lp

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %49 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %49, ptr %11, align 8
  %50 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %46) #5
  store ptr %50, ptr %10, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %51 = load ptr, ptr %9, align 8
  %52 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %51)
          to label %53 unwind label %.loopexit.split-lp79

53:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %54 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %55 = shl i64 %54, 32
  %sext = add i64 %55, -4294967296
  %56 = ashr exact i64 %sext, 32
  %57 = icmp sgt i64 %56, %26
  br i1 %57, label %.preheader52, label %.loopexit53

.loopexit.loopexit:                               ; preds = %95, %.preheader52
  %lpad.loopexit72 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.loopexit.split-lp:                      ; preds = %.preheader52.preheader, %45
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %._crit_edge.thread, %124, %.loopexit77.thread, %18
  %lpad.loopexit54 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %._crit_edge65, %163, %160, %158, %157, %155, %152, %150, %148, %145, %143, %141
  %lpad.loopexit.split-lp55 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

58:                                               ; preds = %20
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %.loopexit.split-lp

.lr.ph:                                           ; preds = %24, %.lr.ph
  %60 = phi i64 [ %73, %.lr.ph ], [ 0, %24 ]
  %.03262 = phi i32 [ %.1, %.lr.ph ], [ -1, %24 ]
  %.03561 = phi i32 [ %72, %.lr.ph ], [ 0, %24 ]
  %61 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %62 = add i64 %61, -1
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %62) #5
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %64)
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %60) #5
  %67 = load float, ptr %66, align 4, !tbaa !9
  %68 = fsub float %65, %67
  %69 = call noundef float @_ZSt4fabsf(float noundef %68)
  %70 = fpext float %69 to double
  %71 = fcmp olt double %70, 1.000000e-02
  %72 = add i32 %.03561, 1
  %.1 = select i1 %71, i32 %72, i32 %.03262
  %73 = zext i32 %72 to i64
  %74 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %75 = add i64 %74, -1
  %76 = icmp ugt i64 %75, %73
  br i1 %76, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader52:                                     ; preds = %53, %103
  %indvars.iv.in = phi i64 [ %indvars.iv, %103 ], [ %26, %53 ]
  %indvars.iv = add nsw i64 %indvars.iv.in, 1
  %77 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %78 = add i64 %77, -1
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %78) #5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %81 unwind label %.loopexit.loopexit

81:                                               ; preds = %.preheader52
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #5
  %83 = load float, ptr %82, align 4, !tbaa !9
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #5
  %85 = load float, ptr %84, align 4, !tbaa !9
  %86 = fpext float %85 to double
  %87 = fmul double %86, 8.000000e-01
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #5
  %89 = load float, ptr %88, align 4, !tbaa !9
  %90 = fpext float %89 to double
  %91 = fmul double %87, %90
  %92 = fptrunc double %91 to float
  %93 = invoke noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef %80, ptr noundef nonnull %8, float noundef %83, float noundef %92)
          to label %94 unwind label %.loopexit73

94:                                               ; preds = %81
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %.not41 = icmp eq i32 %93, -1
  br i1 %.not41, label %.loopexit77, label %95

95:                                               ; preds = %94
  %96 = sext i32 %93 to i64
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %96) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %98 unwind label %.loopexit.loopexit

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %99 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %99, ptr %11, align 8
  %100 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %96) #5
  store ptr %100, ptr %10, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %101 = load ptr, ptr %9, align 8
  %102 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %101)
          to label %103 unwind label %.loopexit78

103:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %104 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %105 = shl i64 %104, 32
  %sext86 = add i64 %105, -4294967296
  %106 = ashr exact i64 %sext86, 32
  %107 = icmp slt i64 %indvars.iv, %106
  br i1 %107, label %.preheader52, label %.loopexit53, !llvm.loop !13

.loopexit73:                                      ; preds = %81
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %108

.loopexit.split-lp74:                             ; preds = %31
  %lpad.loopexit.split-lp75 = landingpad { ptr, i32 }
          cleanup
  br label %108

108:                                              ; preds = %.loopexit.split-lp74, %.loopexit73
  %lpad.phi76 = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit73 ], [ %lpad.loopexit.split-lp75, %.loopexit.split-lp74 ]
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %.loopexit.split-lp

.loopexit78:                                      ; preds = %98
  %lpad.loopexit80 = landingpad { ptr, i32 }
          cleanup
  br label %109

.loopexit.split-lp79:                             ; preds = %48
  %lpad.loopexit.split-lp81 = landingpad { ptr, i32 }
          cleanup
  br label %109

109:                                              ; preds = %.loopexit.split-lp79, %.loopexit78
  %lpad.phi82 = phi { ptr, i32 } [ %lpad.loopexit80, %.loopexit78 ], [ %lpad.loopexit.split-lp81, %.loopexit.split-lp79 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  br label %.loopexit.split-lp

.loopexit77:                                      ; preds = %94
  br i1 %.not41.peel.not, label %.loopexit77.thread, label %.loopexit53

.loopexit77.thread:                               ; preds = %44, %.loopexit77
  %110 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %111 = add i64 %110, -1
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %111) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %113 unwind label %.loopexit.split-lp.loopexit

113:                                              ; preds = %.loopexit77.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %114 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %114, ptr %14, align 8
  %115 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %116 = add i64 %115, -1
  %117 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %116) #5
  store ptr %117, ptr %13, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %118 = load ptr, ptr %12, align 8
  %119 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr %118)
          to label %120 unwind label %121

120:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %.loopexit53

121:                                              ; preds = %113
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %.loopexit.split-lp

.loopexit53:                                      ; preds = %103, %53, %120, %.loopexit77
  %123 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %.not44 = icmp eq i64 %123, 0
  br i1 %.not44, label %139, label %124

124:                                              ; preds = %.loopexit53
  invoke void @_Z13selectBestOneRSt6vectorIP16CornerDescriptorSaIS1_EES4_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %125 unwind label %.loopexit.split-lp.loopexit

125:                                              ; preds = %124
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %139

._crit_edge.thread:                               ; preds = %24, %._crit_edge
  %126 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %127 = add i64 %126, -1
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %127) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %128)
          to label %129 unwind label %.loopexit.split-lp.loopexit

129:                                              ; preds = %._crit_edge.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  %130 = call ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  store ptr %130, ptr %17, align 8
  %131 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %132 = add i64 %131, -1
  %133 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef %132) #5
  store ptr %133, ptr %16, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP16CornerDescriptorSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  %134 = load ptr, ptr %15, align 8
  %135 = invoke ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr %134)
          to label %136 unwind label %137

136:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %139

137:                                              ; preds = %129
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %.loopexit.split-lp

139:                                              ; preds = %136, %125, %.loopexit53
  %140 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %.not45 = icmp eq i64 %140, 0
  br i1 %.not45, label %141, label %18, !llvm.loop !15

141:                                              ; preds = %139
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %143 unwind label %.loopexit.split-lp.loopexit.split-lp

143:                                              ; preds = %141
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %145 unwind label %.loopexit.split-lp.loopexit.split-lp

145:                                              ; preds = %143
  %146 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %144, i64 noundef %146)
          to label %148 unwind label %.loopexit.split-lp.loopexit.split-lp

148:                                              ; preds = %145
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %150 unwind label %.loopexit.split-lp.loopexit.split-lp

150:                                              ; preds = %148
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %152 unwind label %.loopexit.split-lp.loopexit.split-lp

152:                                              ; preds = %150
  %153 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %151, i64 noundef %153)
          to label %155 unwind label %.loopexit.split-lp.loopexit.split-lp

155:                                              ; preds = %152
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %157 unwind label %.loopexit.split-lp.loopexit.split-lp

157:                                              ; preds = %155
  invoke void @_Z16thresholdCornersRSt6vectorIP16CornerDescriptorSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %158 unwind label %.loopexit.split-lp.loopexit.split-lp

158:                                              ; preds = %157
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %160 unwind label %.loopexit.split-lp.loopexit.split-lp

160:                                              ; preds = %158
  %161 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %159, i64 noundef %161)
          to label %163 unwind label %.loopexit.split-lp.loopexit.split-lp

163:                                              ; preds = %160
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader:                                       ; preds = %163
  %165 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %166 = trunc i64 %165 to i32
  %167 = icmp sgt i32 %166, 0
  br i1 %167, label %.lr.ph64, label %._crit_edge65

._crit_edge65:                                    ; preds = %170, %.preheader
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %168 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %176 unwind label %.loopexit.split-lp.loopexit.split-lp

.lr.ph64:                                         ; preds = %.preheader, %170
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %170 ], [ 0, %.preheader ]
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv83) #5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %169)
          to label %170 unwind label %174

170:                                              ; preds = %.lr.ph64
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %171 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %sext87 = shl i64 %171, 32
  %172 = ashr exact i64 %sext87, 32
  %173 = icmp slt i64 %indvars.iv.next84, %172
  br i1 %173, label %.lr.ph64, label %._crit_edge65, !llvm.loop !16

174:                                              ; preds = %.lr.ph64
  %175 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

176:                                              ; preds = %._crit_edge65
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret void

.loopexit.split-lp:                               ; preds = %.loopexit.loopexit, %.loopexit.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %174, %137, %121, %109, %108, %58
  %.pn = phi { ptr, i32 } [ %175, %174 ], [ %lpad.phi82, %109 ], [ %122, %121 ], [ %lpad.phi76, %108 ], [ %138, %137 ], [ %59, %58 ], [ %lpad.loopexit54, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp55, %.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit72, %.loopexit.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.loopexit.split-lp ]
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP16CornerDescriptorSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #1 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 #3 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)) #4

; 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
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14}
!14 = !{!"llvm.loop.peeled.count", i32 1}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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