; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor/EdgeDetector._c3d4632f (EE)

; 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.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.12" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }
%class.Segment = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl" }
%"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ChainPoint *, std::allocator<ChainPoint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.ChainPoint = type { i32, i32, float, float }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

31:                                               ; preds = %359, %2
  %32 = load i32, ptr %11, align 4, !tbaa !11
  %33 = zext i32 %32 to i64
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = call noundef i64 @_ZNKSt6vectorIP7SegmentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %36 = icmp ult i64 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %31
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %363

38:                                               ; preds = %31
  call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = load i32, ptr %11, align 4, !tbaa !11
  %41 = zext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.Segment, ptr %43, i32 0, i32 0
  %45 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #5
  %46 = icmp ugt i64 %45, 10
  br i1 %46, label %47, label %358

47:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 2, ptr %13, align 4, !tbaa !11
  br label %48

48:                                               ; preds = %82, %47
  %49 = load i32, ptr %13, align 4, !tbaa !11
  %50 = zext i32 %49 to i64
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load i32, ptr %11, align 4, !tbaa !11
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #5
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.Segment, ptr %55, i32 0, i32 0
  %57 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #5
  %58 = sub i64 %57, 2
  %59 = icmp ult i64 %50, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %48
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %85

61:                                               ; preds = %48
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = load i32, ptr %11, align 4, !tbaa !11
  %64 = zext i32 %63 to i64
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.Segment, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %13, align 4, !tbaa !11
  %69 = zext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #5
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds %class.ChainPoint, ptr %71, i32 0, i32 3
  %73 = load float, ptr %72, align 4, !tbaa !13
  %74 = fcmp ogt float %73, 1.000000e+00
  br i1 %74, label %75, label %81

75:                                               ; preds = %61
  invoke void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %76 unwind label %77

76:                                               ; preds = %75
  br label %81

77:                                               ; preds = %75
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %14, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %362

81:                                               ; preds = %76, %61
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %13, align 4, !tbaa !11
  %84 = add i32 %83, 1
  store i32 %84, ptr %13, align 4, !tbaa !11
  br label %48, !llvm.loop !15

85:                                               ; preds = %60
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %86

86:                                               ; preds = %174, %85
  %87 = load i32, ptr %10, align 4, !tbaa !11
  %88 = add i32 %87, 1
  %89 = zext i32 %88 to i64
  %90 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %92, label %175

92:                                               ; preds = %86
  %93 = load i32, ptr %10, align 4, !tbaa !11
  %94 = add i32 %93, 1
  %95 = zext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %95) #5
  %97 = load i32, ptr %96, align 4, !tbaa !11
  %98 = load i32, ptr %10, align 4, !tbaa !11
  %99 = zext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %99) #5
  %101 = load i32, ptr %100, align 4, !tbaa !11
  %102 = sub i32 %97, %101
  %103 = icmp ult i32 %102, 15
  br i1 %103, label %104, label %171

104:                                              ; preds = %92
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !11
  %107 = zext i32 %106 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %107) #5
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = getelementptr inbounds %class.Segment, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %10, align 4, !tbaa !11
  %112 = zext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %112) #5
  %114 = load i32, ptr %113, align 4, !tbaa !11
  %115 = zext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %115) #5
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.ChainPoint, ptr %117, i32 0, i32 3
  %119 = load float, ptr %118, align 4, !tbaa !13
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !11
  %122 = zext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %122) #5
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %class.Segment, ptr %124, i32 0, i32 0
  %126 = load i32, ptr %10, align 4, !tbaa !11
  %127 = add i32 %126, 1
  %128 = zext i32 %127 to i64
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %128) #5
  %130 = load i32, ptr %129, align 4, !tbaa !11
  %131 = zext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %131) #5
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = getelementptr inbounds %class.ChainPoint, ptr %133, i32 0, i32 3
  %135 = load float, ptr %134, align 4, !tbaa !13
  %136 = fcmp olt float %119, %135
  br i1 %136, label %137, label %153

137:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %138 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %18, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  %140 = load i32, ptr %10, align 4, !tbaa !11
  %141 = zext i32 %140 to i64
  %142 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %18, i64 noundef %141) #5
  %143 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %17, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEC2IPjvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %16, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8
  %146 = invoke ptr @_ZNSt6vectorIjSaIjEE5eraseEN9__gnu_cxx17__normal_iteratorIPKjS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %145)
          to label %147 unwind label %149

147:                                              ; preds = %137
  %148 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %19, i32 0, i32 0
  store ptr %146, ptr %148, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %170

149:                                              ; preds = %137
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %14, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %362

153:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %154 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %22, i32 0, i32 0
  store ptr %154, ptr %155, align 8
  %156 = load i32, ptr %10, align 4, !tbaa !11
  %157 = add i32 %156, 1
  %158 = zext i32 %157 to i64
  %159 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %22, i64 noundef %158) #5
  %160 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %21, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEC2IPjvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  %161 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.12", ptr %20, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = invoke ptr @_ZNSt6vectorIjSaIjEE5eraseEN9__gnu_cxx17__normal_iteratorIPKjS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %162)
          to label %164 unwind label %166

164:                                              ; preds = %153
  %165 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %23, i32 0, i32 0
  store ptr %163, ptr %165, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %170

166:                                              ; preds = %153
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %14, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %362

170:                                              ; preds = %164, %147
  br label %174

171:                                              ; preds = %92
  %172 = load i32, ptr %10, align 4, !tbaa !11
  %173 = add i32 %172, 1
  store i32 %173, ptr %10, align 4, !tbaa !11
  br label %174

174:                                              ; preds = %171, %170
  br label %86, !llvm.loop !17

175:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = load i32, ptr %11, align 4, !tbaa !11
  %178 = zext i32 %177 to i64
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %176, i64 noundef %178) #5
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds %class.Segment, ptr %180, i32 0, i32 0
  %182 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %181) #5
  %183 = lshr i64 %182, 1
  %184 = trunc i64 %183 to i32
  store i32 %184, ptr %24, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %185 unwind label %203

185:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = load i32, ptr %11, align 4, !tbaa !11
  %188 = zext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %188) #5
  %190 = load ptr, ptr %189, align 8, !tbaa !5
  %191 = getelementptr inbounds %class.Segment, ptr %190, i32 0, i32 0
  %192 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %191) #5
  %193 = sub i64 %192, 1
  %194 = trunc i64 %193 to i32
  store i32 %194, ptr %25, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %195 unwind label %207

195:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %196 unwind label %211

196:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 0, ptr %27, align 4, !tbaa !11
  br label %197

197:                                              ; preds = %257, %196
  %198 = load i32, ptr %27, align 4, !tbaa !11
  %199 = zext i32 %198 to i64
  %200 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %201 = icmp ult i64 %199, %200
  br i1 %201, label %215, label %202

202:                                              ; preds = %197
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %269

203:                                              ; preds = %175
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %14, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %362

207:                                              ; preds = %185
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %14, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %362

211:                                              ; preds = %195
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %14, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %362

215:                                              ; preds = %197
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = load i32, ptr %11, align 4, !tbaa !11
  %218 = zext i32 %217 to i64
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %216, i64 noundef %218) #5
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = getelementptr inbounds %class.Segment, ptr %220, i32 0, i32 0
  %222 = load i32, ptr %27, align 4, !tbaa !11
  %223 = zext i32 %222 to i64
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %223) #5
  %225 = load i32, ptr %224, align 4, !tbaa !11
  %226 = zext i32 %225 to i64
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %226) #5
  %228 = load ptr, ptr %227, align 8, !tbaa !5
  %229 = getelementptr inbounds %class.ChainPoint, ptr %228, i32 0, i32 0
  %230 = load i32, ptr %229, align 4, !tbaa !18
  %231 = sitofp i32 %230 to float
  store float %231, ptr %8, align 4, !tbaa !9
  %232 = load ptr, ptr %3, align 8, !tbaa !5
  %233 = load i32, ptr %11, align 4, !tbaa !11
  %234 = zext i32 %233 to i64
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %232, i64 noundef %234) #5
  %236 = load ptr, ptr %235, align 8, !tbaa !5
  %237 = getelementptr inbounds %class.Segment, ptr %236, i32 0, i32 0
  %238 = load i32, ptr %27, align 4, !tbaa !11
  %239 = zext i32 %238 to i64
  %240 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %239) #5
  %241 = load i32, ptr %240, align 4, !tbaa !11
  %242 = zext i32 %241 to i64
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %242) #5
  %244 = load ptr, ptr %243, align 8, !tbaa !5
  %245 = getelementptr inbounds %class.ChainPoint, ptr %244, i32 0, i32 1
  %246 = load i32, ptr %245, align 4, !tbaa !19
  %247 = sitofp i32 %246 to float
  store float %247, ptr %9, align 4, !tbaa !9
  %248 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %249 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #6
          to label %250 unwind label %260

250:                                              ; preds = %215
  %251 = load float, ptr %8, align 4, !tbaa !9
  %252 = load float, ptr %9, align 4, !tbaa !9
  %253 = load float, ptr %6, align 4, !tbaa !9
  %254 = load float, ptr %7, align 4, !tbaa !9
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %249, float noundef %251, float noundef %252, float noundef %253, float noundef %254)
          to label %255 unwind label %264

255:                                              ; preds = %250
  store ptr %249, ptr %28, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %248, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %256 unwind label %260

256:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %27, align 4, !tbaa !11
  %259 = add i32 %258, 1
  store i32 %259, ptr %27, align 4, !tbaa !11
  br label %197, !llvm.loop !20

260:                                              ; preds = %255, %215
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %14, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %15, align 4
  br label %268

264:                                              ; preds = %250
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %14, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %249, i64 noundef 120) #7
  br label %268

268:                                              ; preds = %264, %260
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %362

269:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 1, ptr %29, align 4, !tbaa !11
  br label %270

270:                                              ; preds = %354, %269
  %271 = load i32, ptr %29, align 4, !tbaa !11
  %272 = zext i32 %271 to i64
  %273 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %274 = icmp ult i64 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %270
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %357

276:                                              ; preds = %270
  %277 = load i32, ptr %29, align 4, !tbaa !11
  %278 = zext i32 %277 to i64
  %279 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %278) #5
  %280 = load i32, ptr %279, align 4, !tbaa !11
  %281 = load i32, ptr %29, align 4, !tbaa !11
  %282 = sub i32 %281, 1
  %283 = zext i32 %282 to i64
  %284 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %283) #5
  %285 = load i32, ptr %284, align 4, !tbaa !11
  %286 = sub i32 %280, %285
  %287 = icmp ugt i32 %286, 20
  br i1 %287, label %288, label %353

288:                                              ; preds = %276
  %289 = load ptr, ptr %3, align 8, !tbaa !5
  %290 = load i32, ptr %11, align 4, !tbaa !11
  %291 = zext i32 %290 to i64
  %292 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %289, i64 noundef %291) #5
  %293 = load ptr, ptr %292, align 8, !tbaa !5
  %294 = getelementptr inbounds %class.Segment, ptr %293, i32 0, i32 0
  %295 = load i32, ptr %29, align 4, !tbaa !11
  %296 = zext i32 %295 to i64
  %297 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %296) #5
  %298 = load i32, ptr %297, align 4, !tbaa !11
  %299 = load i32, ptr %29, align 4, !tbaa !11
  %300 = sub i32 %299, 1
  %301 = zext i32 %300 to i64
  %302 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %301) #5
  %303 = load i32, ptr %302, align 4, !tbaa !11
  %304 = add i32 %298, %303
  %305 = lshr i32 %304, 1
  %306 = zext i32 %305 to i64
  %307 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %294, i64 noundef %306) #5
  %308 = load ptr, ptr %307, align 8, !tbaa !5
  %309 = getelementptr inbounds %class.ChainPoint, ptr %308, i32 0, i32 0
  %310 = load i32, ptr %309, align 4, !tbaa !18
  %311 = sitofp i32 %310 to float
  store float %311, ptr %8, align 4, !tbaa !9
  %312 = load ptr, ptr %3, align 8, !tbaa !5
  %313 = load i32, ptr %11, align 4, !tbaa !11
  %314 = zext i32 %313 to i64
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %312, i64 noundef %314) #5
  %316 = load ptr, ptr %315, align 8, !tbaa !5
  %317 = getelementptr inbounds %class.Segment, ptr %316, i32 0, i32 0
  %318 = load i32, ptr %29, align 4, !tbaa !11
  %319 = zext i32 %318 to i64
  %320 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %319) #5
  %321 = load i32, ptr %320, align 4, !tbaa !11
  %322 = load i32, ptr %29, align 4, !tbaa !11
  %323 = sub i32 %322, 1
  %324 = zext i32 %323 to i64
  %325 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %324) #5
  %326 = load i32, ptr %325, align 4, !tbaa !11
  %327 = add i32 %321, %326
  %328 = lshr i32 %327, 1
  %329 = zext i32 %328 to i64
  %330 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %317, i64 noundef %329) #5
  %331 = load ptr, ptr %330, align 8, !tbaa !5
  %332 = getelementptr inbounds %class.ChainPoint, ptr %331, i32 0, i32 1
  %333 = load i32, ptr %332, align 4, !tbaa !19
  %334 = sitofp i32 %333 to float
  store float %334, ptr %9, align 4, !tbaa !9
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %336 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #6
          to label %337 unwind label %344

337:                                              ; preds = %288
  %338 = load float, ptr %8, align 4, !tbaa !9
  %339 = load float, ptr %9, align 4, !tbaa !9
  %340 = load float, ptr %6, align 4, !tbaa !9
  %341 = load float, ptr %7, align 4, !tbaa !9
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %336, float noundef %338, float noundef %339, float noundef %340, float noundef %341)
          to label %342 unwind label %348

342:                                              ; preds = %337
  store ptr %336, ptr %30, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %335, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %343 unwind label %344

343:                                              ; preds = %342
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %353

344:                                              ; preds = %342, %288
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %14, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %15, align 4
  br label %352

348:                                              ; preds = %337
  %349 = landingpad { ptr, i32 }
          cleanup
  %350 = extractvalue { ptr, i32 } %349, 0
  store ptr %350, ptr %14, align 8
  %351 = extractvalue { ptr, i32 } %349, 1
  store i32 %351, ptr %15, align 4
  call void @_ZdlPvm(ptr noundef %336, i64 noundef 120) #7
  br label %352

352:                                              ; preds = %348, %344
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %362

353:                                              ; preds = %343, %276
  br label %354

354:                                              ; preds = %353
  %355 = load i32, ptr %29, align 4, !tbaa !11
  %356 = add i32 %355, 1
  store i32 %356, ptr %29, align 4, !tbaa !11
  br label %270, !llvm.loop !21

357:                                              ; preds = %275
  br label %358

358:                                              ; preds = %357, %38
  br label %359

359:                                              ; preds = %358
  %360 = load i32, ptr %11, align 4, !tbaa !11
  %361 = add i32 %360, 1
  store i32 %361, ptr %11, align 4, !tbaa !11
  br label %31, !llvm.loop !22

362:                                              ; preds = %352, %268, %211, %207, %203, %166, %149, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  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 @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %364

363:                                              ; preds = %37
  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 @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret void

364:                                              ; preds = %362
  %365 = load ptr, ptr %14, align 8
  %366 = load i32, ptr %15, align 4
  %367 = insertvalue { ptr, i32 } poison, ptr %365, 0
  %368 = insertvalue { ptr, i32 } %367, i32 %366, 1
  resume { ptr, i32 } %368
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 12}
!14 = !{!"_ZTS10ChainPoint", !12, i64 0, !12, i64 4, !10, i64 8, !10, i64 12}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!14, !12, i64 0}
!19 = !{!14, !12, i64 4}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.12" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19detectPointsOnEdgesRSt6vectorIP7SegmentSaIS1_EERS_IP16CornerDescriptorSaIS6_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.6", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.12", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %16 = call noundef i64 @_ZNKSt6vectorIP7SegmentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %._crit_edge87, label %.lr.ph86

._crit_edge87:                                    ; preds = %.loopexit, %2
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  ret void

.lr.ph86:                                         ; preds = %2, %.loopexit
  %17 = phi i64 [ %208, %.loopexit ], [ 0, %2 ]
  %.06284 = phi i32 [ %207, %.loopexit ], [ 0, %2 ]
  call void @_ZNSt6vectorIjSaIjEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = icmp ugt i64 %20, 10
  br i1 %21, label %22, label %.loopexit

22:                                               ; preds = %.lr.ph86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 2, ptr %4, align 4, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  %26 = add i64 %25, -5
  %27 = icmp ult i64 %26, -3
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %42, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %28 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %29 = icmp ugt i64 %28, 1
  br i1 %29, label %.lr.ph77, label %._crit_edge78

.lr.ph:                                           ; preds = %22, %42
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33) #5
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 12
  %37 = load float, ptr %36, align 4, !tbaa !11
  %38 = fcmp ogt float %37, 1.000000e+00
  br i1 %38, label %39, label %42

39:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %42 unwind label %40

40:                                               ; preds = %39
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %211

42:                                               ; preds = %.lr.ph, %39
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = add i32 %43, 1
  store i32 %44, ptr %4, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #5
  %49 = add i64 %48, -2
  %50 = icmp ugt i64 %49, %45
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !14

.lr.ph77:                                         ; preds = %._crit_edge, %96
  %51 = phi i64 [ %98, %96 ], [ 1, %._crit_edge ]
  %52 = phi i32 [ %97, %96 ], [ 1, %._crit_edge ]
  %.06375 = phi i32 [ %.164, %96 ], [ 0, %._crit_edge ]
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %51) #5
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = zext i32 %.06375 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %55) #5
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = sub i32 %54, %57
  %59 = icmp ult i32 %58, 15
  br i1 %59, label %60, label %96

60:                                               ; preds = %.lr.ph77
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %55) #5
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %65) #5
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 12
  %69 = load float, ptr %68, align 4, !tbaa !11
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %51) #5
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %74) #5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 12
  %78 = load float, ptr %77, align 4, !tbaa !11
  %79 = fcmp olt float %69, %78
  br i1 %79, label %80, label %88

80:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %81 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %81, ptr %7, align 8
  %82 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %55) #5
  store ptr %82, ptr %6, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEC2IPjvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %83 = load ptr, ptr %5, align 8
  %84 = invoke ptr @_ZNSt6vectorIjSaIjEE5eraseEN9__gnu_cxx17__normal_iteratorIPKjS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %83)
          to label %85 unwind label %86

85:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %96

86:                                               ; preds = %80
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %211

88:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %89 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %89, ptr %10, align 8
  %90 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %51) #5
  store ptr %90, ptr %9, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEC2IPjvEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %91 = load ptr, ptr %8, align 8
  %92 = invoke ptr @_ZNSt6vectorIjSaIjEE5eraseEN9__gnu_cxx17__normal_iteratorIPKjS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %91)
          to label %93 unwind label %94

93:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %96

94:                                               ; preds = %88
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %211

96:                                               ; preds = %.lr.ph77, %85, %93
  %.164 = phi i32 [ %.06375, %85 ], [ %.06375, %93 ], [ %52, %.lr.ph77 ]
  %97 = add i32 %.164, 1
  %98 = zext i32 %97 to i64
  %99 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %100 = icmp ugt i64 %99, %98
  br i1 %100, label %.lr.ph77, label %._crit_edge78, !llvm.loop !16

._crit_edge78:                                    ; preds = %96, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #5
  %104 = lshr i64 %103, 1
  %105 = trunc i64 %104 to i32
  store i32 %105, ptr %11, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %106 unwind label %117

106:                                              ; preds = %._crit_edge78
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = call noundef i64 @_ZNKSt6vectorIP10ChainPointSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #5
  %110 = trunc i64 %109 to i32
  %111 = add i32 %110, -1
  store i32 %111, ptr %12, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %112 unwind label %119

112:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %113 unwind label %121

113:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  %114 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %.not88 = icmp eq i64 %114, 0
  br i1 %.not88, label %.preheader, label %.lr.ph81

.preheader:                                       ; preds = %146, %113
  %115 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %116 = icmp ugt i64 %115, 1
  br i1 %116, label %.lr.ph83, label %.loopexit

117:                                              ; preds = %._crit_edge78
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %211

119:                                              ; preds = %106
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %211

121:                                              ; preds = %112
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %211

.lr.ph81:                                         ; preds = %113, %146
  %123 = phi i64 [ %148, %146 ], [ 0, %113 ]
  %.05779 = phi i32 [ %147, %146 ], [ 0, %113 ]
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %123) #5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %128) #5
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = load i32, ptr %130, align 4, !tbaa !17
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %123) #5
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %136) #5
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 4
  %140 = load i32, ptr %139, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %141 = invoke noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #6
          to label %142 unwind label %151

142:                                              ; preds = %.lr.ph81
  %143 = sitofp i32 %140 to float
  %144 = sitofp i32 %131 to float
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %141, float noundef %144, float noundef %143, float noundef 1.000000e+02, float noundef 1.000000e+01)
          to label %145 unwind label %153

145:                                              ; preds = %142
  store ptr %141, ptr %14, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %146 unwind label %151

146:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  %147 = add i32 %.05779, 1
  %148 = zext i32 %147 to i64
  %149 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %150 = icmp ugt i64 %149, %148
  br i1 %150, label %.lr.ph81, label %.preheader, !llvm.loop !19

151:                                              ; preds = %145, %.lr.ph81
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %155

153:                                              ; preds = %142
  %154 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %141, i64 noundef 120) #7
  br label %155

155:                                              ; preds = %153, %151
  %.pn70 = phi { ptr, i32 } [ %152, %151 ], [ %154, %153 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  br label %211

.lr.ph83:                                         ; preds = %.preheader, %202
  %156 = phi i64 [ %204, %202 ], [ 1, %.preheader ]
  %.082 = phi i32 [ %203, %202 ], [ 1, %.preheader ]
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %156) #5
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = add i32 %.082, -1
  %160 = zext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %160) #5
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = sub i32 %158, %162
  %164 = icmp ugt i32 %163, 20
  br i1 %164, label %165, label %202

165:                                              ; preds = %.lr.ph83
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %156) #5
  %169 = load i32, ptr %168, align 4, !tbaa !9
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %160) #5
  %171 = load i32, ptr %170, align 4, !tbaa !9
  %172 = add i32 %171, %169
  %173 = lshr i32 %172, 1
  %174 = zext nneg i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %174) #5
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = load i32, ptr %176, align 4, !tbaa !17
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7SegmentSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #5
  %179 = load ptr, ptr %178, align 8, !tbaa !5
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %156) #5
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %160) #5
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = add i32 %183, %181
  %185 = lshr i32 %184, 1
  %186 = zext nneg i32 %185 to i64
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10ChainPointSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %186) #5
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = getelementptr inbounds i8, ptr %188, i64 4
  %190 = load i32, ptr %189, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  %191 = invoke noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #6
          to label %192 unwind label %197

192:                                              ; preds = %165
  %193 = sitofp i32 %190 to float
  %194 = sitofp i32 %177 to float
  invoke void @_ZN16CornerDescriptorC2Effff(ptr noundef nonnull align 8 dereferenceable(116) %191, float noundef %194, float noundef %193, float noundef 1.000000e+02, float noundef 1.000000e+01)
          to label %195 unwind label %199

195:                                              ; preds = %192
  store ptr %191, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIP16CornerDescriptorSaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %196 unwind label %197

196:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %202

197:                                              ; preds = %195, %165
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %201

199:                                              ; preds = %192
  %200 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %191, i64 noundef 120) #7
  br label %201

201:                                              ; preds = %199, %197
  %.pn = phi { ptr, i32 } [ %198, %197 ], [ %200, %199 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %211

202:                                              ; preds = %.lr.ph83, %196
  %203 = add i32 %.082, 1
  %204 = zext i32 %203 to i64
  %205 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %206 = icmp ugt i64 %205, %204
  br i1 %206, label %.lr.ph83, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %202, %.preheader, %.lr.ph86
  %207 = add i32 %.06284, 1
  %208 = zext i32 %207 to i64
  %209 = call noundef i64 @_ZNKSt6vectorIP7SegmentSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %210 = icmp ugt i64 %209, %208
  br i1 %210, label %.lr.ph86, label %._crit_edge87, !llvm.loop !21

211:                                              ; preds = %201, %155, %121, %119, %117, %94, %86, %40
  %.pn72 = phi { ptr, i32 } [ %41, %40 ], [ %87, %86 ], [ %95, %94 ], [ %.pn70, %155 ], [ %.pn, %201 ], [ %122, %121 ], [ %120, %119 ], [ %118, %117 ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn72
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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