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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88)) #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner5getL1Ev(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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef %0, ptr noundef %1, float noundef %2, float noundef %3) #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store float %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = invoke noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %20)
          to label %22 unwind label %33

22:                                               ; preds = %4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = invoke noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %23)
          to label %25 unwind label %33

25:                                               ; preds = %22
  %26 = fdiv float %21, %24
  store float %26, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store float 0x3FC3333340000000, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %27

27:                                               ; preds = %146, %25
  %28 = load i32, ptr %16, align 4, !tbaa !11
  %29 = zext i32 %28 to i64
  %30 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %37, label %32

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

33:                                               ; preds = %22, %4
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %13, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %14, align 4
  br label %201

37:                                               ; preds = %27
  %38 = load float, ptr %7, align 4, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !11
  %40 = zext i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %40) #5
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = invoke noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %42)
          to label %44 unwind label %135

44:                                               ; preds = %37
  %45 = fsub float %38, %43
  %46 = invoke noundef float @_ZSt4fabsf(float noundef %45)
          to label %47 unwind label %135

47:                                               ; preds = %44
  %48 = fpext float %46 to double
  %49 = fcmp olt double %48, 1.000000e-01
  br i1 %49, label %50, label %145

50:                                               ; preds = %47
  %51 = load float, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %16, align 4, !tbaa !11
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = invoke noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %55)
          to label %57 unwind label %135

57:                                               ; preds = %50
  %58 = load i32, ptr %16, align 4, !tbaa !11
  %59 = zext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %59) #5
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = invoke noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %61)
          to label %63 unwind label %135

63:                                               ; preds = %57
  %64 = fdiv float %56, %62
  %65 = fsub float %51, %64
  %66 = invoke noundef float @_ZSt4fabsf(float noundef %65)
          to label %67 unwind label %135

67:                                               ; preds = %63
  store float %66, ptr %11, align 4, !tbaa !9
  %68 = load float, ptr %11, align 4, !tbaa !9
  %69 = load float, ptr %15, align 4, !tbaa !9
  %70 = fcmp olt float %68, %69
  br i1 %70, label %86, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = invoke noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %72)
          to label %74 unwind label %135

74:                                               ; preds = %71
  %75 = load i32, ptr %16, align 4, !tbaa !11
  %76 = zext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %76) #5
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = invoke noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %78)
          to label %80 unwind label %135

80:                                               ; preds = %74
  %81 = fsub float %73, %79
  %82 = invoke noundef float @_ZSt4fabsf(float noundef %81)
          to label %83 unwind label %135

83:                                               ; preds = %80
  %84 = fpext float %82 to double
  %85 = fcmp olt double %84, 1.000000e-01
  br i1 %85, label %86, label %144

86:                                               ; preds = %83, %67
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = invoke noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %87)
          to label %89 unwind label %135

89:                                               ; preds = %86
  %90 = load i32, ptr %16, align 4, !tbaa !11
  %91 = zext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %91) #5
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = invoke noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %93)
          to label %95 unwind label %135

95:                                               ; preds = %89
  %96 = fsub float %88, %94
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = invoke noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %97)
          to label %99 unwind label %135

99:                                               ; preds = %95
  %100 = load i32, ptr %16, align 4, !tbaa !11
  %101 = zext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %101) #5
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = invoke noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %103)
          to label %105 unwind label %135

105:                                              ; preds = %99
  %106 = fsub float %98, %104
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = invoke noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %107)
          to label %109 unwind label %135

109:                                              ; preds = %105
  %110 = load i32, ptr %16, align 4, !tbaa !11
  %111 = zext i32 %110 to i64
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %111) #5
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = invoke noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %113)
          to label %115 unwind label %135

115:                                              ; preds = %109
  %116 = fsub float %108, %114
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = invoke noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %117)
          to label %119 unwind label %135

119:                                              ; preds = %115
  %120 = load i32, ptr %16, align 4, !tbaa !11
  %121 = zext i32 %120 to i64
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %121) #5
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = invoke noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %123)
          to label %125 unwind label %135

125:                                              ; preds = %119
  %126 = fsub float %118, %124
  %127 = fmul float %116, %126
  %128 = call float @llvm.fmuladd.f32(float %96, float %106, float %127)
  store float %128, ptr %9, align 4, !tbaa !9
  %129 = load float, ptr %9, align 4, !tbaa !9
  %130 = load float, ptr %8, align 4, !tbaa !9
  %131 = fcmp olt float %129, %130
  br i1 %131, label %132, label %143

132:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %133 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %133, ptr %17, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %134 unwind label %139

134:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %143

135:                                              ; preds = %119, %115, %109, %105, %99, %95, %89, %86, %80, %74, %71, %63, %57, %50, %44, %37
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %13, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %14, align 4
  br label %149

139:                                              ; preds = %132
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %149

143:                                              ; preds = %134, %125
  br label %144

144:                                              ; preds = %143, %83
  br label %145

145:                                              ; preds = %144, %47
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %16, align 4, !tbaa !11
  %148 = add i32 %147, 1
  store i32 %148, ptr %16, align 4, !tbaa !11
  br label %27, !llvm.loop !13

149:                                              ; preds = %139, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %200

150:                                              ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 -1, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %151

151:                                              ; preds = %195, %150
  %152 = load i32, ptr %19, align 4, !tbaa !11
  %153 = zext i32 %152 to i64
  %154 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %155 = icmp ult i64 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %198

157:                                              ; preds = %151
  %158 = load float, ptr %12, align 4, !tbaa !9
  %159 = load i32, ptr %19, align 4, !tbaa !11
  %160 = zext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %160) #5
  %162 = load i32, ptr %161, align 4, !tbaa !11
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %163) #5
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = invoke noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %165)
          to label %167 unwind label %190

167:                                              ; preds = %157
  %168 = load i32, ptr %19, align 4, !tbaa !11
  %169 = zext i32 %168 to i64
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %169) #5
  %171 = load i32, ptr %170, align 4, !tbaa !11
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %172) #5
  %174 = load ptr, ptr %173, align 8, !tbaa !5
  %175 = invoke noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %174)
          to label %176 unwind label %190

176:                                              ; preds = %167
  %177 = fdiv float %166, %175
  %178 = fsub float %158, %177
  %179 = invoke noundef float @_ZSt4fabsf(float noundef %178)
          to label %180 unwind label %190

180:                                              ; preds = %176
  store float %179, ptr %11, align 4, !tbaa !9
  %181 = load float, ptr %11, align 4, !tbaa !9
  %182 = load float, ptr %15, align 4, !tbaa !9
  %183 = fcmp olt float %181, %182
  br i1 %183, label %184, label %194

184:                                              ; preds = %180
  %185 = load float, ptr %11, align 4, !tbaa !9
  store float %185, ptr %15, align 4, !tbaa !9
  %186 = load i32, ptr %19, align 4, !tbaa !11
  %187 = zext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %187) #5
  %189 = load i32, ptr %188, align 4, !tbaa !11
  store i32 %189, ptr %18, align 4, !tbaa !11
  br label %194

190:                                              ; preds = %176, %167, %157
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %13, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %200

194:                                              ; preds = %184, %180
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %19, align 4, !tbaa !11
  %197 = add i32 %196, 1
  store i32 %197, ptr %19, align 4, !tbaa !11
  br label %151, !llvm.loop !15

198:                                              ; preds = %156
  %199 = load i32, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret i32 %199

200:                                              ; preds = %190, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %201

201:                                              ; preds = %200, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %13, align 8
  %204 = load i32, ptr %14, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206
}

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6Corner5getL1Ev(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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z18searchSimilarPointP16CornerDescriptorSt6vectorIS0_SaIS0_EEff(ptr noundef %0, ptr noundef %1, float noundef %2, float noundef %3) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %7 = call noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %8 = call noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %9 = fdiv float %7, %8
  %10 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %68, %4
  %11 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %.not47 = icmp eq i64 %11, 0
  br i1 %.not47, label %._crit_edge, label %.lr.ph46

.lr.ph:                                           ; preds = %4, %68
  %12 = phi i64 [ %70, %68 ], [ 0, %4 ]
  %.03642 = phi i32 [ %69, %68 ], [ 0, %4 ]
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = call noundef float @_ZNK6Corner14getCornerScaleEv(ptr noundef nonnull align 4 dereferenceable(88) %14)
  %16 = fsub float %2, %15
  %17 = call noundef float @_ZSt4fabsf(float noundef %16)
  %18 = fpext float %17 to double
  %19 = fcmp olt double %18, 1.000000e-01
  br i1 %19, label %20, label %68

20:                                               ; preds = %.lr.ph
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = call noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %22)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = call noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %25)
  %27 = fdiv float %23, %26
  %28 = fsub float %9, %27
  %29 = call noundef float @_ZSt4fabsf(float noundef %28)
  %30 = fcmp olt float %29, 0x3FC3333340000000
  br i1 %30, label %40, label %31

31:                                               ; preds = %20
  %32 = call noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = call noundef float @_ZNK6Corner8getAngleEv(ptr noundef nonnull align 4 dereferenceable(88) %34)
  %36 = fsub float %32, %35
  %37 = call noundef float @_ZSt4fabsf(float noundef %36)
  %38 = fpext float %37 to double
  %39 = fcmp olt double %38, 1.000000e-01
  br i1 %39, label %40, label %68

40:                                               ; preds = %31, %20
  %41 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %43)
  %45 = fsub float %41, %44
  %46 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = call noundef float @_ZNK6Corner4getXEv(ptr noundef nonnull align 4 dereferenceable(88) %48)
  %50 = fsub float %46, %49
  %51 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %53)
  %55 = fsub float %51, %54
  %56 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %0)
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %12) #5
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = call noundef float @_ZNK6Corner4getYEv(ptr noundef nonnull align 4 dereferenceable(88) %58)
  %60 = fsub float %56, %59
  %61 = fmul float %55, %60
  %62 = call float @llvm.fmuladd.f32(float %45, float %50, float %61)
  %63 = fcmp olt float %62, %3
  br i1 %63, label %64, label %68

64:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 %.03642, ptr %6, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %65 unwind label %66

65:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %68

66:                                               ; preds = %64
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  resume { ptr, i32 } %67

68:                                               ; preds = %.lr.ph, %40, %65, %31
  %69 = add i32 %.03642, 1
  %70 = zext i32 %69 to i64
  %71 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %72 = icmp ugt i64 %71, %70
  br i1 %72, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %93, %.preheader
  %.035.lcssa = phi i32 [ -1, %.preheader ], [ %.1, %93 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  ret i32 %.035.lcssa

.lr.ph46:                                         ; preds = %.preheader, %93
  %73 = phi i64 [ %95, %93 ], [ 0, %.preheader ]
  %.045 = phi i32 [ %94, %93 ], [ 0, %.preheader ]
  %.03544 = phi i32 [ %.1, %93 ], [ -1, %.preheader ]
  %.03743 = phi float [ %.138, %93 ], [ 0x3FC3333340000000, %.preheader ]
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %73) #5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %76) #5
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = call noundef float @_ZNK6Corner5getL2Ev(ptr noundef nonnull align 4 dereferenceable(88) %78)
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %73) #5
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %82) #5
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = call noundef float @_ZNK6Corner5getL1Ev(ptr noundef nonnull align 4 dereferenceable(88) %84)
  %86 = fdiv float %79, %85
  %87 = fsub float %9, %86
  %88 = call noundef float @_ZSt4fabsf(float noundef %87)
  %89 = fcmp olt float %88, %.03743
  br i1 %89, label %90, label %93

90:                                               ; preds = %.lr.ph46
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %73) #5
  %92 = load i32, ptr %91, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %.lr.ph46, %90
  %.138 = phi float [ %88, %90 ], [ %.03743, %.lr.ph46 ]
  %.1 = phi i32 [ %92, %90 ], [ %.03544, %.lr.ph46 ]
  %94 = add i32 %.045, 1
  %95 = zext i32 %94 to i64
  %96 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %97 = icmp ugt i64 %96, %95
  br i1 %97, label %.lr.ph46, label %._crit_edge, !llvm.loop !13
}

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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