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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.21 = external hidden unnamed_addr constant [13 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 uwtable
declare dso_local void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #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) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10checkHomogP16CornerDescriptorS0_P6MatrixfRf(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

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

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

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

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

declare noundef float @_Z7distEucPfS_i(ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116)) #5 align 2

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

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

32:                                               ; preds = %124, %5
  %33 = load i32, ptr %21, align 4, !tbaa !11
  %34 = load i32, ptr %15, align 4, !tbaa !11
  %35 = icmp ult i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %128

37:                                               ; preds = %32
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.21)
          to label %39 unwind label %51

39:                                               ; preds = %37
  %40 = load i32, ptr %21, align 4, !tbaa !11
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef %40)
          to label %42 unwind label %51

42:                                               ; preds = %39
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %44 unwind label %51

44:                                               ; preds = %42
  %45 = load float, ptr %10, align 4, !tbaa !9
  store float %45, ptr %14, align 4, !tbaa !9
  store i32 -1, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %106, %44
  %47 = load i32, ptr %25, align 4, !tbaa !11
  %48 = load i32, ptr %16, align 4, !tbaa !11
  %49 = icmp ult i32 %47, %48
  br i1 %49, label %55, label %50

50:                                               ; preds = %46
  store i32 5, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %109

51:                                               ; preds = %117, %112, %42, %39, %37
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %23, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %24, align 4
  br label %127

55:                                               ; preds = %46
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %21, align 4, !tbaa !11
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #6
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = invoke noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116) %60)
          to label %62 unwind label %101

62:                                               ; preds = %55
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load i32, ptr %25, align 4, !tbaa !11
  %65 = zext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #6
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = invoke noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116) %67)
          to label %69 unwind label %101

69:                                               ; preds = %62
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i32, ptr %25, align 4, !tbaa !11
  %72 = zext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72) #6
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = invoke noundef i32 @_ZNK16CornerDescriptor7getSizeEv(ptr noundef nonnull align 8 dereferenceable(116) %74)
          to label %76 unwind label %101

76:                                               ; preds = %69
  %77 = invoke noundef float @_Z7distEucPfS_i(ptr noundef %61, ptr noundef %68, i32 noundef %75)
          to label %78 unwind label %101

78:                                               ; preds = %76
  store float %77, ptr %13, align 4, !tbaa !9
  %79 = load float, ptr %13, align 4, !tbaa !9
  %80 = load float, ptr %14, align 4, !tbaa !9
  %81 = fcmp olt float %79, %80
  br i1 %81, label %82, label %105

82:                                               ; preds = %78
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = load i32, ptr %21, align 4, !tbaa !11
  %85 = zext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #6
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i32, ptr %25, align 4, !tbaa !11
  %90 = zext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #6
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load float, ptr %19, align 4, !tbaa !9
  %95 = invoke noundef i32 @_Z10checkHomogP16CornerDescriptorS0_P6MatrixfRf(ptr noundef %87, ptr noundef %92, ptr noundef %93, float noundef %94, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %96 unwind label %101

96:                                               ; preds = %82
  %97 = icmp ne i32 %95, 0
  br i1 %97, label %98, label %105

98:                                               ; preds = %96
  %99 = load float, ptr %13, align 4, !tbaa !9
  store float %99, ptr %14, align 4, !tbaa !9
  %100 = load i32, ptr %25, align 4, !tbaa !11
  store i32 %100, ptr %17, align 4, !tbaa !11
  br label %105

101:                                              ; preds = %82, %76, %69, %62, %55
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %23, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %127

105:                                              ; preds = %98, %96, %78
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %25, align 4, !tbaa !11
  %108 = add i32 %107, 1
  store i32 %108, ptr %25, align 4, !tbaa !11
  br label %46, !llvm.loop !13

109:                                              ; preds = %50
  %110 = load i32, ptr %17, align 4, !tbaa !11
  %111 = icmp sge i32 %110, 0
  br i1 %111, label %112, label %123

112:                                              ; preds = %109
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = load i32, ptr %21, align 4, !tbaa !11
  %115 = zext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115) #6
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %116)
          to label %117 unwind label %51

117:                                              ; preds = %112
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = load i32, ptr %17, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %120) #6
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %121)
          to label %122 unwind label %51

122:                                              ; preds = %117
  br label %123

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

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

127:                                              ; preds = %101, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %141

128:                                              ; preds = %36
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %129) #6
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %130) #6
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %131, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %133 unwind label %137

133:                                              ; preds = %128
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %136 unwind label %137

136:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  ret void

137:                                              ; preds = %133, %128
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %23, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %24, align 4
  br label %141

141:                                              ; preds = %137, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %23, align 8
  %144 = load i32, ptr %24, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.21 = external hidden unnamed_addr constant [13 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 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 #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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10checkHomogP16CornerDescriptorS0_P6MatrixfRf(ptr noundef, ptr noundef, ptr noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

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

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

declare noundef float @_Z7distEucPfS_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z21checkMatchDescriptorsRSt6vectorIP16CornerDescriptorSaIS1_EES4_P6MatrixS6_f(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef readnone %2, ptr noundef %3, float noundef %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %9 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %10 = trunc i64 %9 to i32
  %11 = call noundef i64 @_ZNKSt6vectorIP16CornerDescriptorSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge54, label %.lr.ph53

.lr.ph53:                                         ; preds = %5
  %12 = and i64 %11, 4294967295
  %.not58 = icmp eq i64 %12, 0
  br i1 %.not58, label %.lr.ph53.split, label %.lr.ph53.split.us.preheader

.lr.ph53.split.us.preheader:                      ; preds = %.lr.ph53
  %wide.trip.count64 = and i64 %9, 4294967295
  %wide.trip.count = and i64 %11, 4294967295
  br label %.lr.ph53.split.us

.lr.ph53.split.us:                                ; preds = %.lr.ph53.split.us.preheader, %24
  %indvars.iv61 = phi i64 [ 0, %.lr.ph53.split.us.preheader ], [ %indvars.iv.next62, %24 ]
  %13 = 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.21)
          to label %14 unwind label %.split.us

14:                                               ; preds = %.lr.ph53.split.us
  %15 = trunc nuw i64 %indvars.iv61 to i32
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %15)
          to label %17 unwind label %.split.us

17:                                               ; preds = %14
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.us unwind label %.split.us

19:                                               ; preds = %._crit_edge.us
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv61) #6
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %21 unwind label %.split.us

21:                                               ; preds = %19
  %22 = zext nneg i32 %.143.us to i64
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22) #6
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %24 unwind label %.split.us

24:                                               ; preds = %21, %._crit_edge.us
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %._crit_edge54, label %.lr.ph53.split.us, !llvm.loop !5

.preheader.us:                                    ; preds = %17, %46
  %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 0, %17 ]
  %.04049.us = phi float [ %.141.us, %46 ], [ %4, %17 ]
  %.04248.us = phi i32 [ %.143.us, %46 ], [ -1, %17 ]
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv61) #6
  %26 = load ptr, ptr %25, align 8, !tbaa !7
  %27 = call noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116) %26)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %29 = load ptr, ptr %28, align 8, !tbaa !7
  %30 = call noundef ptr @_ZN16CornerDescriptor6getVecEv(ptr noundef nonnull align 8 dereferenceable(116) %29)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %32 = load ptr, ptr %31, align 8, !tbaa !7
  %33 = call noundef i32 @_ZNK16CornerDescriptor7getSizeEv(ptr noundef nonnull align 8 dereferenceable(116) %32)
  %34 = invoke noundef float @_Z7distEucPfS_i(ptr noundef %27, ptr noundef %30, i32 noundef %33)
          to label %35 unwind label %.split56.us

35:                                               ; preds = %.preheader.us
  %36 = fcmp olt float %34, %.04049.us
  br i1 %36, label %37, label %46

37:                                               ; preds = %35
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv61) #6
  %39 = load ptr, ptr %38, align 8, !tbaa !7
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %41 = load ptr, ptr %40, align 8, !tbaa !7
  %42 = invoke noundef i32 @_Z10checkHomogP16CornerDescriptorS0_P6MatrixfRf(ptr noundef %39, ptr noundef %41, ptr noundef %3, float noundef 5.000000e+00, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %43 unwind label %.split56.us

43:                                               ; preds = %37
  %.not.us = icmp eq i32 %42, 0
  br i1 %.not.us, label %46, label %44

44:                                               ; preds = %43
  %45 = trunc nuw i64 %indvars.iv to i32
  br label %46

46:                                               ; preds = %44, %43, %35
  %.143.us = phi i32 [ %45, %44 ], [ %.04248.us, %43 ], [ %.04248.us, %35 ]
  %.141.us = phi float [ %34, %44 ], [ %.04049.us, %43 ], [ %.04049.us, %35 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %.preheader.us, !llvm.loop !11

._crit_edge.us:                                   ; preds = %46
  %47 = icmp sgt i32 %.143.us, -1
  br i1 %47, label %19, label %24

.split.us:                                        ; preds = %21, %19, %17, %14, %.lr.ph53.split.us
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %63

.split56.us:                                      ; preds = %37, %.preheader.us
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %63

._crit_edge54:                                    ; preds = %24, %.preheader, %5
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %50 = 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) %6)
          to label %58 unwind label %61

.lr.ph53.split:                                   ; preds = %.lr.ph53, %.preheader
  %.03951 = phi i32 [ %56, %.preheader ], [ 0, %.lr.ph53 ]
  %51 = 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.21)
          to label %52 unwind label %.split

52:                                               ; preds = %.lr.ph53.split
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 noundef %.03951)
          to label %54 unwind label %.split

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt5flushIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %.split

.preheader:                                       ; preds = %54
  %56 = add nuw i32 %.03951, 1
  %exitcond66.not = icmp eq i32 %56, %10
  br i1 %exitcond66.not, label %._crit_edge54, label %.lr.ph53.split, !llvm.loop !5

.split:                                           ; preds = %54, %52, %.lr.ph53.split
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %._crit_edge54
  %59 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP16CornerDescriptorSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %60 unwind label %61

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

61:                                               ; preds = %58, %._crit_edge54
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %63

63:                                               ; preds = %.split, %.split.us, %.split56.us, %61
  %.pn.pn = phi { ptr, i32 } [ %62, %61 ], [ %49, %.split56.us ], [ %57, %.split ], [ %48, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  resume { ptr, i32 } %.pn.pn
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}


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