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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.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 }
%"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 }

@_ZN7MVision9EdgeImage13horizonOffsetE = external dso_local global float, align 4
@_ZZN7MVision9EdgeImage12createLookupEvE1i = external hidden global i32, align 4
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [126 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.5", align 8
  %6 = alloca float, align 4
  %7 = alloca %"class.MVision::Vector2D", align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca %"class.MVision::Vector2D", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  %13 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %12, i32 0, i32 5
  call void @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %14 = getelementptr inbounds i8, ptr %12, i64 16
  %15 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %12, i32 0, i32 4
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = call noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %12, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  call void @_ZN7MVision5Image6resizeEjj(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %17, i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store float 0.000000e+00, ptr %3, align 4, !tbaa !26
  br label %21

21:                                               ; preds = %101, %1
  %22 = load float, ptr %3, align 4, !tbaa !26
  %23 = getelementptr inbounds i8, ptr %12, i64 16
  %24 = getelementptr inbounds %"class.MVision::Image", ptr %23, i32 0, i32 2
  %25 = load i32, ptr %24, align 8, !tbaa !28
  %26 = uitofp i32 %25 to float
  %27 = fmul float %26, 3.000000e+00
  %28 = fcmp olt float %22, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %31 = getelementptr inbounds i8, ptr %12, i64 16
  %32 = getelementptr inbounds %"class.MVision::Image", ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 4, !tbaa !29
  %34 = uitofp i32 %33 to float
  %35 = fdiv float %34, 2.000000e+00
  store float %35, ptr %6, align 4, !tbaa !26
  br label %36

36:                                               ; preds = %54, %30
  %37 = load float, ptr %6, align 4, !tbaa !26
  %38 = getelementptr inbounds i8, ptr %12, i64 16
  %39 = getelementptr inbounds %"class.MVision::Image", ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !29
  %41 = uitofp i32 %40 to float
  %42 = fcmp olt float %37, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %36
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %66

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %45 = load float, ptr %6, align 4, !tbaa !26
  %46 = load float, ptr %3, align 4, !tbaa !26
  %47 = load float, ptr @_ZN7MVision9EdgeImage13horizonOffsetE, align 4, !tbaa !26
  %48 = fadd float %46, %47
  invoke void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %45, float noundef %48)
          to label %49 unwind label %57

49:                                               ; preds = %44
  invoke void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %50 unwind label %57

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %51

51:                                               ; preds = %50
  %52 = load float, ptr %3, align 4, !tbaa !26
  %53 = invoke noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %52)
          to label %54 unwind label %61

54:                                               ; preds = %51
  %55 = load float, ptr %6, align 4, !tbaa !26
  %56 = fadd float %55, %53
  store float %56, ptr %6, align 4, !tbaa !26
  br label %36, !llvm.loop !30

57:                                               ; preds = %49, %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %65

61:                                               ; preds = %51
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  br label %65

65:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %110

66:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %67 = getelementptr inbounds i8, ptr %12, i64 16
  %68 = getelementptr inbounds %"class.MVision::Image", ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !29
  %70 = uitofp i32 %69 to float
  %71 = fdiv float %70, 2.000000e+00
  store float %71, ptr %10, align 4, !tbaa !26
  br label %72

72:                                               ; preds = %86, %66
  %73 = load float, ptr %10, align 4, !tbaa !26
  %74 = fcmp oge float %73, 0.000000e+00
  br i1 %74, label %76, label %75

75:                                               ; preds = %72
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %98

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %77 = load float, ptr %10, align 4, !tbaa !26
  %78 = load float, ptr %3, align 4, !tbaa !26
  %79 = load float, ptr @_ZN7MVision9EdgeImage13horizonOffsetE, align 4, !tbaa !26
  %80 = fadd float %78, %79
  invoke void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %77, float noundef %80)
          to label %81 unwind label %89

81:                                               ; preds = %76
  invoke void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %82 unwind label %89

82:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %83

83:                                               ; preds = %82
  %84 = load float, ptr %3, align 4, !tbaa !26
  %85 = invoke noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %84)
          to label %86 unwind label %93

86:                                               ; preds = %83
  %87 = load float, ptr %10, align 4, !tbaa !26
  %88 = fsub float %87, %85
  store float %88, ptr %10, align 4, !tbaa !26
  br label %72, !llvm.loop !32

89:                                               ; preds = %81, %76
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %97

93:                                               ; preds = %83
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  br label %97

97:                                               ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %110

98:                                               ; preds = %75
  %99 = getelementptr inbounds %"class.MVision::EdgeImage", ptr %12, i32 0, i32 5
  invoke void @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %100 unwind label %106

100:                                              ; preds = %98
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  br label %101

101:                                              ; preds = %100
  %102 = load float, ptr %3, align 4, !tbaa !26
  %103 = call noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %102)
  %104 = load float, ptr %3, align 4, !tbaa !26
  %105 = fadd float %104, %103
  store float %105, ptr %3, align 4, !tbaa !26
  br label %21, !llvm.loop !33

106:                                              ; preds = %98
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %8, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %9, align 4
  br label %110

110:                                              ; preds = %106, %97, %65
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %118

111:                                              ; preds = %29
  %112 = load i32, ptr @_ZZN7MVision9EdgeImage12createLookupEvE1i, align 4, !tbaa !34
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr @_ZZN7MVision9EdgeImage12createLookupEvE1i, align 4, !tbaa !34
  %114 = icmp sgt i32 %112, 10
  br i1 %114, label %115, label %117

115:                                              ; preds = %111
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
  br label %117

117:                                              ; preds = %115, %111
  ret void

118:                                              ; preds = %110
  %119 = load ptr, ptr %8, align 8
  %120 = load i32, ptr %9, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122
}

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

declare void @_ZN7MVision5Image6resizeEjj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { 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, !6, i64 72}
!10 = !{!"_ZTSN7MVision9EdgeImageE", !11, i64 0, !12, i64 16, !13, i64 40, !14, i64 48, !6, i64 72, !18, i64 80, !22, i64 104}
!11 = !{!"_ZTS9Debugable", !6, i64 8}
!12 = !{!"_ZTSN7MVision5ImageE", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16}
!13 = !{!"int", !7, i64 0}
!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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !7, i64 0}
!28 = !{!12, !13, i64 8}
!29 = !{!12, !13, i64 4}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = !{!13, !13, i64 0}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.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 }
%"class.MVision::Vector2D" = type { float, float }

@_ZN7MVision9EdgeImage13horizonOffsetE = external dso_local local_unnamed_addr global float, align 4
@_ZZN7MVision9EdgeImage12createLookupEvE1i = external hidden local_unnamed_addr global i32, align 4
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [126 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7MVision9EdgeImage12createLookupEv(ptr noundef nonnull align 8 dereferenceable(128) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca %"class.MVision::Vector2D", align 4
  %4 = alloca %"class.MVision::Vector2D", align 4
  %5 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call noundef i32 @_ZNK7MVision5Image5widthEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = tail call noundef i32 @_ZNK7MVision5Image6heightEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  tail call void @_ZN7MVision5Image6resizeEjj(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %9, i32 noundef %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load i32, ptr %12, align 8, !tbaa !25
  %14 = uitofp i32 %13 to float
  %15 = fmul float %14, 3.000000e+00
  %16 = fcmp ogt float %15, 0.000000e+00
  br i1 %16, label %.lr.ph29, label %._crit_edge30

.lr.ph29:                                         ; preds = %1
  %17 = getelementptr inbounds i8, ptr %0, i64 20
  br label %21

._crit_edge30:                                    ; preds = %46, %1
  %18 = load i32, ptr @_ZZN7MVision9EdgeImage12createLookupEvE1i, align 4, !tbaa !26
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @_ZZN7MVision9EdgeImage12createLookupEvE1i, align 4, !tbaa !26
  %20 = icmp sgt i32 %18, 10
  br i1 %20, label %56, label %58

21:                                               ; preds = %.lr.ph29, %46
  %.01827 = phi float [ 0.000000e+00, %.lr.ph29 ], [ %48, %46 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %22 = load i32, ptr %17, align 4, !tbaa !27
  %23 = uitofp i32 %22 to float
  %24 = fmul float %23, 5.000000e-01
  %25 = fcmp olt float %24, %23
  br i1 %25, label %.lr.ph, label %.lr.ph25.preheader

._crit_edge.loopexit:                             ; preds = %29
  %.pre = fmul float %33, 5.000000e-01
  br label %.lr.ph25.preheader

.lr.ph25.preheader:                               ; preds = %21, %._crit_edge.loopexit
  %.023.ph = phi float [ %24, %21 ], [ %.pre, %._crit_edge.loopexit ]
  br label %.lr.ph25

.lr.ph:                                           ; preds = %21, %29
  %.01722 = phi float [ %31, %29 ], [ %24, %21 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %26 = load float, ptr @_ZN7MVision9EdgeImage13horizonOffsetE, align 4, !tbaa !28
  %27 = fadd float %.01827, %26
  invoke void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef %.01722, float noundef %27)
          to label %28 unwind label %35

28:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %29 unwind label %35

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %30 = call noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %.01827)
  %31 = fadd float %.01722, %30
  %32 = load i32, ptr %17, align 4, !tbaa !27
  %33 = uitofp i32 %32 to float
  %34 = fcmp olt float %31, %33
  br i1 %34, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !30

35:                                               ; preds = %28, %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %55

._crit_edge26:                                    ; preds = %40
  invoke void @_ZNSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %46 unwind label %53

.lr.ph25:                                         ; preds = %.lr.ph25.preheader, %40
  %.023 = phi float [ %42, %40 ], [ %.023.ph, %.lr.ph25.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %37 = load float, ptr @_ZN7MVision9EdgeImage13horizonOffsetE, align 4, !tbaa !28
  %38 = fadd float %.01827, %37
  invoke void @_ZN7MVision8Vector2DC1Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %.023, float noundef %38)
          to label %39 unwind label %44

39:                                               ; preds = %.lr.ph25
  invoke void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %40 unwind label %44

40:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %41 = call noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %.01827)
  %42 = fsub float %.023, %41
  %43 = fcmp ult float %42, 0.000000e+00
  br i1 %43, label %._crit_edge26, label %.lr.ph25, !llvm.loop !32

44:                                               ; preds = %39, %.lr.ph25
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %55

46:                                               ; preds = %._crit_edge26
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  %47 = call noundef float @_ZN7MVision9EdgeImage11edgeingStepEf(float noundef %.01827)
  %48 = fadd float %.01827, %47
  %49 = load i32, ptr %12, align 8, !tbaa !25
  %50 = uitofp i32 %49 to float
  %51 = fmul float %50, 3.000000e+00
  %52 = fcmp olt float %48, %51
  br i1 %52, label %21, label %._crit_edge30, !llvm.loop !33

53:                                               ; preds = %._crit_edge26
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %55

55:                                               ; preds = %53, %44, %35
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %45, %44 ], [ %54, %53 ]
  call void @_ZNSt6vectorIN7MVision8Vector2DESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn

56:                                               ; preds = %._crit_edge30
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
  br label %58

58:                                               ; preds = %56, %._crit_edge30
  ret void
}

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

declare void @_ZN7MVision5Image6resizeEjj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { 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, !8, i64 72}
!6 = !{!"_ZTSN7MVision9EdgeImageE", !7, i64 0, !11, i64 16, !12, i64 40, !13, i64 48, !8, i64 72, !17, i64 80, !21, i64 104}
!7 = !{!"_ZTS9Debugable", !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN7MVision5ImageE", !12, i64 0, !12, i64 4, !12, i64 8, !8, i64 16}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!17 = !{!"_ZTSSt6vectorIS_IN7MVision8Vector2DESaIS1_EESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN7MVision8Vector2DESaIS2_EESaIS4_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!21 = !{!"_ZTSSt6vectorIN7MVision8Vector2DESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7MVision8Vector2DESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!25 = !{!11, !12, i64 8}
!26 = !{!12, !12, i64 0}
!27 = !{!11, !12, i64 4}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !9, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}


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