; LLVM IR from ArefMq/SoccerBallDetection :: src/modules/edgeimage.ll (ZN7MVision9EdgeImage6updateEv)

; 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.MVision::Image::Pixel" = type { i8, i8, i8 }
%"class.MVision::Vector2D" = type { float, float }
%"class.MVision::EdgeImage" = type { %class.Debugable, %"class.MVision::Image", i32, %"class.std::vector", ptr, %"class.std::vector.0", %"class.std::vector.5" }
%class.Debugable = type { ptr, ptr }
%"class.MVision::Image" = type { i32, i32, i32, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<MVision::Vector2D>, std::allocator<std::vector<MVision::Vector2D>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<MVision::Vector2D>, std::allocator<std::vector<MVision::Vector2D>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<MVision::Vector2D>, std::allocator<std::vector<MVision::Vector2D>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<MVision::Vector2D>, std::allocator<std::vector<MVision::Vector2D>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<MVision::Vector2D, std::allocator<MVision::Vector2D>>::_Vector_impl" }
%"struct.std::_Vector_base<MVision::Vector2D, std::allocator<MVision::Vector2D>>::_Vector_impl" = type { %"struct.std::_Vector_base<MVision::Vector2D, std::allocator<MVision::Vector2D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MVision::Vector2D, std::allocator<MVision::Vector2D>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN7MVision9EdgeImage5blackE = external dso_local global %"class.MVision::Image::Pixel", align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128)) #0 align 2

declare noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24)) #1

declare noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

declare void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local i24 @_ZN7MVision9EdgeImage13calculateEdgeERKNS_8Vector2DES3_S3_i(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7MVision9EdgeImage12setSafePixelEiiRKNS_5Image5PixelE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(3)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(3) ptr @_ZN7MVision5Image8getPixelEjj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MVision9EdgeImage6updateEv(ptr noundef nonnull align 8 dereferenceable(128) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.MVision::Vector2D", align 4
  %9 = alloca %"class.MVision::Vector2D", align 4
  %10 = alloca %"class.MVision::Vector2D", align 4
  %11 = alloca %"class.MVision::Image::Pixel", align 1
  %12 = alloca %"class.MVision::Image::Pixel", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  %14 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 6
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %15 = getelementptr inbounds i8, ptr %13, i64 16
  %16 = getelementptr inbounds %"class.MVision::Image", ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 4, !tbaa !9
  %18 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = call noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %21 = icmp ne i32 %17, %20
  br i1 %21, label %29, label %22

22:                                               ; preds = %1
  %23 = getelementptr inbounds i8, ptr %13, i64 16
  %24 = call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !12
  %27 = call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
  %28 = icmp ne i32 %24, %27
  br i1 %28, label %29, label %30

29:                                               ; preds = %22, %1
  call void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128) %13)
  br label %30

30:                                               ; preds = %29, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !27
  br label %31

31:                                               ; preds = %55, %30
  %32 = load i32, ptr %3, align 4, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %13, i64 16
  %34 = getelementptr inbounds %"class.MVision::Image", ptr %33, i32 0, i32 2
  %35 = load i32, ptr %34, align 8, !tbaa !28
  %36 = icmp ult i32 %32, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !27
  br label %39

39:                                               ; preds = %51, %38
  %40 = load i32, ptr %5, align 4, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %13, i64 16
  %42 = getelementptr inbounds %"class.MVision::Image", ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp ult i32 %40, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %54

46:                                               ; preds = %39
  %47 = getelementptr inbounds i8, ptr %13, i64 16
  %48 = load i32, ptr %5, align 4, !tbaa !27
  %49 = load i32, ptr %3, align 4, !tbaa !27
  %50 = call noundef nonnull align 1 dereferenceable(3) ptr @_ZN7MVision5Image8getPixelEjj(ptr noundef nonnull align 8 dereferenceable(24) %47, i32 noundef %48, i32 noundef %49)
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %50, ptr align 1 @_ZN7MVision9EdgeImage5blackE, i64 3, i1 false), !tbaa.struct !29
  br label %51

51:                                               ; preds = %46
  %52 = load i32, ptr %5, align 4, !tbaa !27
  %53 = add i32 %52, 1
  store i32 %53, ptr %5, align 4, !tbaa !27
  br label %39, !llvm.loop !31

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !27
  %57 = add i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !27
  br label %31, !llvm.loop !33

58:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !27
  br label %59

59:                                               ; preds = %200, %58
  %60 = load i32, ptr %6, align 4, !tbaa !27
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 5
  %63 = call noundef i64 @_ZNKSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #7
  %64 = icmp ult i64 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %59
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %203

66:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !27
  br label %67

67:                                               ; preds = %195, %66
  %68 = load i32, ptr %7, align 4, !tbaa !27
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 5
  %71 = load i32, ptr %6, align 4, !tbaa !27
  %72 = zext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %72)
  %74 = call noundef i64 @_ZNKSt6vectorIN7MVision8Vector2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #7
  %75 = icmp ult i64 %69, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %67
  store i32 11, ptr %4, align 4
  br label %198

77:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %78 = load i32, ptr %6, align 4, !tbaa !27
  %79 = load i32, ptr %7, align 4, !tbaa !27
  %80 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %78, i32 noundef %79)
  %81 = load i32, ptr %6, align 4, !tbaa !27
  %82 = load i32, ptr %7, align 4, !tbaa !27
  %83 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %81, i32 noundef %82)
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %80, float noundef %83)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %84 = load i32, ptr %7, align 4, !tbaa !27
  %85 = icmp ugt i32 %84, 0
  br i1 %85, label %86, label %91

86:                                               ; preds = %77
  %87 = load i32, ptr %6, align 4, !tbaa !27
  %88 = load i32, ptr %7, align 4, !tbaa !27
  %89 = sub i32 %88, 1
  %90 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %87, i32 noundef %89)
  br label %96

91:                                               ; preds = %77
  %92 = load i32, ptr %6, align 4, !tbaa !27
  %93 = load i32, ptr %7, align 4, !tbaa !27
  %94 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %92, i32 noundef %93)
  %95 = fsub float %94, 1.000000e+00
  br label %96

96:                                               ; preds = %91, %86
  %97 = phi float [ %90, %86 ], [ %95, %91 ]
  %98 = load i32, ptr %6, align 4, !tbaa !27
  %99 = icmp ugt i32 %98, 0
  br i1 %99, label %100, label %104

100:                                              ; preds = %96
  %101 = load i32, ptr %6, align 4, !tbaa !27
  %102 = sub i32 %101, 1
  %103 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %102, i32 noundef 0)
  br label %109

104:                                              ; preds = %96
  %105 = load i32, ptr %6, align 4, !tbaa !27
  %106 = load i32, ptr %7, align 4, !tbaa !27
  %107 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %105, i32 noundef %106)
  %108 = fsub float %107, 1.000000e+00
  br label %109

109:                                              ; preds = %104, %100
  %110 = phi float [ %103, %100 ], [ %108, %104 ]
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %97, float noundef %110)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %111 = load i32, ptr %7, align 4, !tbaa !27
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 5
  %114 = load i32, ptr %6, align 4, !tbaa !27
  %115 = zext i32 %114 to i64
  %116 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %115)
  %117 = call noundef i64 @_ZNKSt6vectorIN7MVision8Vector2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %116) #7
  %118 = sub i64 %117, 1
  %119 = icmp ult i64 %112, %118
  br i1 %119, label %120, label %125

120:                                              ; preds = %109
  %121 = load i32, ptr %6, align 4, !tbaa !27
  %122 = load i32, ptr %7, align 4, !tbaa !27
  %123 = add i32 %122, 1
  %124 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %121, i32 noundef %123)
  br label %130

125:                                              ; preds = %109
  %126 = load i32, ptr %6, align 4, !tbaa !27
  %127 = load i32, ptr %7, align 4, !tbaa !27
  %128 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %126, i32 noundef %127)
  %129 = fadd float %128, 1.000000e+00
  br label %130

130:                                              ; preds = %125, %120
  %131 = phi float [ %124, %120 ], [ %129, %125 ]
  %132 = load i32, ptr %6, align 4, !tbaa !27
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 5
  %135 = call noundef i64 @_ZNKSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #7
  %136 = sub i64 %135, 1
  %137 = icmp ult i64 %133, %136
  br i1 %137, label %138, label %142

138:                                              ; preds = %130
  %139 = load i32, ptr %6, align 4, !tbaa !27
  %140 = add i32 %139, 1
  %141 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %140, i32 noundef 0)
  br label %147

142:                                              ; preds = %130
  %143 = load i32, ptr %6, align 4, !tbaa !27
  %144 = load i32, ptr %7, align 4, !tbaa !27
  %145 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %143, i32 noundef %144)
  %146 = fadd float %145, 1.000000e+00
  br label %147

147:                                              ; preds = %142, %138
  %148 = phi float [ %141, %138 ], [ %146, %142 ]
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %131, float noundef %148)
  %149 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %150 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 3
  %151 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %150) #7
  %152 = uitofp i64 %151 to float
  %153 = fcmp oge float %149, %152
  br i1 %153, label %163, label %154

154:                                              ; preds = %147
  %155 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %156 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %13, i32 0, i32 3
  %157 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %158 = fptoui float %157 to i64
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %156, i64 noundef %158)
  %160 = load i32, ptr %159, align 4, !tbaa !27
  %161 = sitofp i32 %160 to float
  %162 = fcmp olt float %155, %161
  br i1 %162, label %163, label %164

163:                                              ; preds = %154, %147
  store i32 13, ptr %4, align 4
  br label %192

164:                                              ; preds = %154
  %165 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  %166 = getelementptr inbounds i8, ptr %13, i64 16
  %167 = getelementptr inbounds %"class.MVision::Image", ptr %166, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = uitofp i32 %168 to float
  %170 = fcmp oge float %165, %169
  br i1 %170, label %178, label %171

171:                                              ; preds = %164
  %172 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  %173 = getelementptr inbounds i8, ptr %13, i64 16
  %174 = getelementptr inbounds %"class.MVision::Image", ptr %173, i32 0, i32 2
  %175 = load i32, ptr %174, align 8, !tbaa !28
  %176 = uitofp i32 %175 to float
  %177 = fcmp oge float %172, %176
  br i1 %177, label %178, label %179

178:                                              ; preds = %171, %164
  store i32 11, ptr %4, align 4
  br label %192

179:                                              ; preds = %171
  %180 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %181 = fcmp olt float %180, 0.000000e+00
  br i1 %181, label %185, label %182

182:                                              ; preds = %179
  %183 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %184 = fcmp olt float %183, 0.000000e+00
  br i1 %184, label %185, label %186

185:                                              ; preds = %182, %179
  store i32 13, ptr %4, align 4
  br label %192

186:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 3, ptr %11) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 @_ZN7MVision9EdgeImage5blackE, i64 3, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.start.p0(i64 3, ptr %12) #7
  %187 = call i24 @_ZN7MVision9EdgeImage13calculateEdgeERKNS_8Vector2DES3_S3_i(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %10, i32 noundef 100)
  store i24 %187, ptr %12, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 %12, i64 3, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 3, ptr %12) #7
  %188 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %189 = fptosi float %188 to i32
  %190 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  %191 = fptosi float %190 to i32
  call void @_ZN7MVision9EdgeImage12setSafePixelEiiRKNS_5Image5PixelE(ptr noundef nonnull align 8 dereferenceable(128) %13, i32 noundef %189, i32 noundef %191, ptr noundef nonnull align 1 dereferenceable(3) %11)
  call void @llvm.lifetime.end.p0(i64 3, ptr %11) #7
  store i32 0, ptr %4, align 4
  br label %192

192:                                              ; preds = %186, %185, %178, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %193 = load i32, ptr %4, align 4
  switch i32 %193, label %198 [
    i32 0, label %194
    i32 13, label %195
  ]

194:                                              ; preds = %192
  br label %195

195:                                              ; preds = %194, %192
  %196 = load i32, ptr %7, align 4, !tbaa !27
  %197 = add i32 %196, 1
  store i32 %197, ptr %7, align 4, !tbaa !27
  br label %67, !llvm.loop !34

198:                                              ; preds = %192, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %6, align 4, !tbaa !27
  %202 = add i32 %201, 1
  store i32 %202, ptr %6, align 4, !tbaa !27
  br label %59, !llvm.loop !35

203:                                              ; preds = %65
  ret void
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) #5 align 2

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

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

attributes #0 = { 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 #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { 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, !11, i64 4}
!10 = !{!"_ZTSN7MVision5ImageE", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 72}
!13 = !{!"_ZTSN7MVision9EdgeImageE", !14, i64 0, !10, i64 16, !11, i64 40, !15, i64 48, !6, i64 72, !19, i64 80, !23, i64 104}
!14 = !{!"_ZTS9Debugable", !6, i64 8}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIN7MVision8Vector2DESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!11, !11, i64 0}
!28 = !{!10, !11, i64 8}
!29 = !{i64 0, i64 1, !30, i64 1, i64 1, !30, i64 2, i64 1, !30}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !32}


; 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.MVision::Image::Pixel" = type { i8, i8, i8 }
%"class.MVision::Vector2D" = type { float, float }

@_ZN7MVision9EdgeImage5blackE = external dso_local local_unnamed_addr global %"class.MVision::Image::Pixel", align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #0 align 2

declare noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

declare void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local i24 @_ZN7MVision9EdgeImage13calculateEdgeERKNS_8Vector2DES3_S3_i(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7MVision9EdgeImage12setSafePixelEiiRKNS_5Image5PixelE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef, ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MVision9EdgeImage6updateEv(ptr noundef nonnull align 8 dereferenceable(128) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"class.MVision::Vector2D", align 4
  %3 = alloca %"class.MVision::Vector2D", align 4
  %4 = alloca %"class.MVision::Vector2D", align 4
  %5 = alloca %"class.MVision::Image::Pixel", align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 20
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = tail call noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %.not = icmp eq i32 %9, %12
  br i1 %.not, label %13, label %17

13:                                               ; preds = %1
  %14 = tail call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  %15 = load ptr, ptr %10, align 8, !tbaa !11
  %16 = tail call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not41 = icmp eq i32 %14, %16
  br i1 %.not41, label %18, label %17

17:                                               ; preds = %13, %1
  tail call void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128) %0)
  br label %18

18:                                               ; preds = %17, %13
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load i32, ptr %19, align 8, !tbaa !26
  %.not54 = icmp eq i32 %20, 0
  %21 = load i32, ptr %8, align 4
  %.not55 = icmp eq i32 %21, 0
  %or.cond = select i1 %.not54, i1 true, i1 %.not55
  br i1 %or.cond, label %.preheader45, label %.preheader46

.preheader46:                                     ; preds = %18, %._crit_edge
  %22 = phi i32 [ %27, %._crit_edge ], [ %20, %18 ]
  %23 = phi i32 [ %28, %._crit_edge ], [ 1, %18 ]
  %.048 = phi i32 [ %29, %._crit_edge ], [ 0, %18 ]
  %.not56 = icmp eq i32 %23, 0
  br i1 %.not56, label %._crit_edge, label %.lr.ph

.preheader45:                                     ; preds = %._crit_edge, %18
  %24 = getelementptr inbounds i8, ptr %0, i64 80
  %25 = tail call noundef i64 @_ZNKSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %.not57 = icmp eq i64 %25, 0
  br i1 %.not57, label %._crit_edge53, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader45
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  br label %.preheader

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %19, align 8, !tbaa !26
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader46
  %27 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %22, %.preheader46 ]
  %28 = phi i32 [ %33, %._crit_edge.loopexit ], [ 0, %.preheader46 ]
  %29 = add nuw i32 %.048, 1
  %30 = icmp ult i32 %29, %27
  br i1 %30, label %.preheader46, label %.preheader45, !llvm.loop !27

.lr.ph:                                           ; preds = %.preheader46, %.lr.ph
  %.03747 = phi i32 [ %32, %.lr.ph ], [ 0, %.preheader46 ]
  %31 = tail call noundef nonnull align 1 dereferenceable(3) ptr @_ZN7MVision5Image8getPixelEjj(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %.03747, i32 noundef %.048)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %31, ptr noundef nonnull align 1 dereferenceable(3) @_ZN7MVision9EdgeImage5blackE, i64 3, i1 false), !tbaa.struct !30
  %32 = add nuw i32 %.03747, 1
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = icmp ult i32 %32, %33
  br i1 %34, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !32

.preheader:                                       ; preds = %.preheader.lr.ph, %.loopexit
  %35 = phi i64 [ 0, %.preheader.lr.ph ], [ %122, %.loopexit ]
  %.03651 = phi i32 [ 0, %.preheader.lr.ph ], [ %.pre-phi, %.loopexit ]
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %35)
  %37 = call noundef i64 @_ZNKSt6vectorIN7MVision8Vector2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %.not58 = icmp eq i64 %37, 0
  br i1 %.not58, label %.preheader..loopexit_crit_edge, label %.lr.ph50

.preheader..loopexit_crit_edge:                   ; preds = %.preheader
  %.pre60 = add i32 %.03651, 1
  br label %.loopexit

.lr.ph50:                                         ; preds = %.preheader
  %.not43 = icmp eq i32 %.03651, 0
  %38 = add i32 %.03651, -1
  %39 = add i32 %.03651, 1
  br label %40

._crit_edge53:                                    ; preds = %.loopexit, %.preheader45
  ret void

40:                                               ; preds = %.lr.ph50, %116
  %41 = phi i64 [ 0, %.lr.ph50 ], [ %118, %116 ]
  %.03549 = phi i32 [ 0, %.lr.ph50 ], [ %117, %116 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %42 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %.03549)
  %43 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %.03549)
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef %42, float noundef %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %.not42 = icmp eq i32 %.03549, 0
  br i1 %.not42, label %47, label %44

44:                                               ; preds = %40
  %45 = add i32 %.03549, -1
  %46 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %45)
  br label %50

47:                                               ; preds = %40
  %48 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef 0)
  %49 = fadd float %48, -1.000000e+00
  br label %50

50:                                               ; preds = %47, %44
  %51 = phi float [ %46, %44 ], [ %49, %47 ]
  br i1 %.not43, label %54, label %52

52:                                               ; preds = %50
  %53 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %38, i32 noundef 0)
  br label %57

54:                                               ; preds = %50
  %55 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef 0, i32 noundef %.03549)
  %56 = fadd float %55, -1.000000e+00
  br label %57

57:                                               ; preds = %54, %52
  %58 = phi float [ %53, %52 ], [ %56, %54 ]
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef %51, float noundef %58)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %35)
  %60 = call noundef i64 @_ZNKSt6vectorIN7MVision8Vector2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #7
  %61 = add i64 %60, -1
  %62 = icmp ugt i64 %61, %41
  br i1 %62, label %63, label %66

63:                                               ; preds = %57
  %64 = add i32 %.03549, 1
  %65 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %64)
  br label %69

66:                                               ; preds = %57
  %67 = call noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %.03549)
  %68 = fadd float %67, 1.000000e+00
  br label %69

69:                                               ; preds = %66, %63
  %70 = phi float [ %65, %63 ], [ %68, %66 ]
  %71 = call noundef i64 @_ZNKSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %72 = add i64 %71, -1
  %73 = icmp ugt i64 %72, %35
  br i1 %73, label %74, label %76

74:                                               ; preds = %69
  %75 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %39, i32 noundef 0)
  br label %79

76:                                               ; preds = %69
  %77 = call noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %.03651, i32 noundef %.03549)
  %78 = fadd float %77, 1.000000e+00
  br label %79

79:                                               ; preds = %76, %74
  %80 = phi float [ %75, %74 ], [ %78, %76 ]
  call void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %70, float noundef %80)
  %81 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %82 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  %83 = uitofp i64 %82 to float
  %84 = fcmp ult float %81, %83
  br i1 %84, label %85, label %116

85:                                               ; preds = %79
  %86 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %87 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %88 = fptoui float %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %88)
  %90 = load i32, ptr %89, align 4, !tbaa !33
  %91 = sitofp i32 %90 to float
  %92 = fcmp olt float %86, %91
  br i1 %92, label %116, label %93

93:                                               ; preds = %85
  %94 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = uitofp i32 %95 to float
  %97 = fcmp ult float %94, %96
  br i1 %97, label %98, label %115

98:                                               ; preds = %93
  %99 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %100 = load i32, ptr %19, align 8, !tbaa !26
  %101 = uitofp i32 %100 to float
  %102 = fcmp ult float %99, %101
  br i1 %102, label %103, label %115

103:                                              ; preds = %98
  %104 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %105 = fcmp olt float %104, 0.000000e+00
  br i1 %105, label %116, label %106

106:                                              ; preds = %103
  %107 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %108 = fcmp olt float %107, 0.000000e+00
  br i1 %108, label %116, label %109

109:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %5) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(3) %5, ptr noundef nonnull align 1 dereferenceable(3) @_ZN7MVision9EdgeImage5blackE, i64 3, i1 false), !tbaa.struct !30
  %110 = call i24 @_ZN7MVision9EdgeImage13calculateEdgeERKNS_8Vector2DES3_S3_i(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef 100)
  store i24 %110, ptr %5, align 4
  %111 = call noundef float @_ZNK7MVision8Vector2D1xEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %112 = fptosi float %111 to i32
  %113 = call noundef float @_ZNK7MVision8Vector2D1yEv(ptr noundef nonnull align 4 dereferenceable(8) %2)
  %114 = fptosi float %113 to i32
  call void @_ZN7MVision9EdgeImage12setSafePixelEiiRKNS_5Image5PixelE(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %112, i32 noundef %114, ptr noundef nonnull align 1 dereferenceable(3) %5)
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %5) #7
  br label %116

115:                                              ; preds = %93, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %.loopexit

116:                                              ; preds = %109, %85, %79, %106, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %117 = add i32 %.03549, 1
  %118 = zext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %35)
  %120 = call noundef i64 @_ZNKSt6vectorIN7MVision8Vector2DESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #7
  %121 = icmp ugt i64 %120, %118
  br i1 %121, label %40, label %.loopexit, !llvm.loop !34

.loopexit:                                        ; preds = %116, %.preheader..loopexit_crit_edge, %115
  %.pre-phi = phi i32 [ %.pre60, %.preheader..loopexit_crit_edge ], [ %39, %115 ], [ %39, %116 ]
  %122 = zext i32 %.pre-phi to i64
  %123 = call noundef i64 @_ZNKSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %124 = icmp ugt i64 %123, %122
  br i1 %124, label %.preheader, label %._crit_edge53, !llvm.loop !35
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN7MVision9EdgeImage11stepTable_XEii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZN7MVision9EdgeImage11stepTable_YEii(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

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

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

attributes #0 = { 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 #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { 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, !7, i64 4}
!6 = !{!"_ZTSN7MVision5ImageE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 72}
!12 = !{!"_ZTSN7MVision9EdgeImageE", !13, i64 0, !6, i64 16, !7, i64 40, !14, i64 48, !10, i64 72, !18, i64 80, !22, i64 104}
!13 = !{!"_ZTS9Debugable", !10, i64 8}
!14 = !{!"_ZTSSt6vectorIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"_ZTSSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!"_ZTSSt6vectorIN7MVision8Vector2DESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!6, !7, i64 8}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.unswitch.partial.disable"}
!30 = !{i64 0, i64 1, !31, i64 1, i64 1, !31, i64 2, i64 1, !31}
!31 = !{!8, !8, i64 0}
!32 = distinct !{!32, !28}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}


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