; LLVM IR from generalized-intelligence/GAAS :: deprecated/software/SLAM/ygz_slam_ros/Thirdparty/fast/src (fast_10_score)

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

%"struct.fast::fast_xy" = type { i16, i16 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4fast20fast_corner_score_10EPKhiRKSt6vectorINS_7fast_xyESaIS3_EEiRS2_IiSaIiEE(ptr noundef %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [16 x i32], align 16
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %13 = load ptr, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  %15 = call noundef i64 @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %15)
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #4
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = mul nsw i32 %16, 3
  %18 = add nsw i32 0, %17
  store i32 %18, ptr %11, align 4, !tbaa !9
  %19 = getelementptr inbounds i32, ptr %11, i64 1
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = mul nsw i32 %20, 3
  %22 = add nsw i32 1, %21
  store i32 %22, ptr %19, align 4, !tbaa !9
  %23 = getelementptr inbounds i32, ptr %11, i64 2
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = mul nsw i32 %24, 2
  %26 = add nsw i32 2, %25
  store i32 %26, ptr %23, align 4, !tbaa !9
  %27 = getelementptr inbounds i32, ptr %11, i64 3
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = mul nsw i32 %28, 1
  %30 = add nsw i32 3, %29
  store i32 %30, ptr %27, align 4, !tbaa !9
  %31 = getelementptr inbounds i32, ptr %11, i64 4
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = mul nsw i32 %32, 0
  %34 = add nsw i32 3, %33
  store i32 %34, ptr %31, align 4, !tbaa !9
  %35 = getelementptr inbounds i32, ptr %11, i64 5
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = mul nsw i32 %36, -1
  %38 = add nsw i32 3, %37
  store i32 %38, ptr %35, align 4, !tbaa !9
  %39 = getelementptr inbounds i32, ptr %11, i64 6
  %40 = load i32, ptr %7, align 4, !tbaa !9
  %41 = mul nsw i32 %40, -2
  %42 = add nsw i32 2, %41
  store i32 %42, ptr %39, align 4, !tbaa !9
  %43 = getelementptr inbounds i32, ptr %11, i64 7
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = mul nsw i32 %44, -3
  %46 = add nsw i32 1, %45
  store i32 %46, ptr %43, align 4, !tbaa !9
  %47 = getelementptr inbounds i32, ptr %11, i64 8
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = mul nsw i32 %48, -3
  %50 = add nsw i32 0, %49
  store i32 %50, ptr %47, align 4, !tbaa !9
  %51 = getelementptr inbounds i32, ptr %11, i64 9
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = mul nsw i32 %52, -3
  %54 = add nsw i32 -1, %53
  store i32 %54, ptr %51, align 4, !tbaa !9
  %55 = getelementptr inbounds i32, ptr %11, i64 10
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = mul nsw i32 %56, -2
  %58 = add nsw i32 -2, %57
  store i32 %58, ptr %55, align 4, !tbaa !9
  %59 = getelementptr inbounds i32, ptr %11, i64 11
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = mul nsw i32 %60, -1
  %62 = add nsw i32 -3, %61
  store i32 %62, ptr %59, align 4, !tbaa !9
  %63 = getelementptr inbounds i32, ptr %11, i64 12
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = mul nsw i32 %64, 0
  %66 = add nsw i32 -3, %65
  store i32 %66, ptr %63, align 4, !tbaa !9
  %67 = getelementptr inbounds i32, ptr %11, i64 13
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = mul nsw i32 %68, 1
  %70 = add nsw i32 -3, %69
  store i32 %70, ptr %67, align 4, !tbaa !9
  %71 = getelementptr inbounds i32, ptr %11, i64 14
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = mul nsw i32 %72, 2
  %74 = add nsw i32 -2, %73
  store i32 %74, ptr %71, align 4, !tbaa !9
  %75 = getelementptr inbounds i32, ptr %11, i64 15
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = mul nsw i32 %76, 3
  %78 = add nsw i32 -1, %77
  store i32 %78, ptr %75, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %115, %5
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = zext i32 %80 to i64
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = call noundef i64 @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #4
  %84 = icmp ult i64 %81, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %118

86:                                               ; preds = %79
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #4
  %92 = getelementptr inbounds %"struct.fast::fast_xy", ptr %91, i32 0, i32 1
  %93 = load i16, ptr %92, align 2, !tbaa !11
  %94 = sext i16 %93 to i32
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = mul nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %87, i64 %97
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #4
  %103 = getelementptr inbounds %"struct.fast::fast_xy", ptr %102, i32 0, i32 0
  %104 = load i16, ptr %103, align 2, !tbaa !14
  %105 = sext i16 %104 to i32
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %98, i64 %106
  %108 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 0
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = call noundef i32 @_ZN4fast20fast_corner_score_10EPKhPKii(ptr noundef %107, ptr noundef %108, i32 noundef %109)
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #4
  store i32 %110, ptr %114, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %86
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = add i32 %116, 1
  store i32 %117, ptr %12, align 4, !tbaa !9
  br label %79, !llvm.loop !15

118:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #4
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN4fast20fast_corner_score_10EPKhPKii(ptr noundef, ptr noundef, i32 noundef) #3

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 2}
!12 = !{!"_ZTSN4fast7fast_xyE", !13, i64 0, !13, i64 2}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4fast20fast_corner_score_10EPKhiRKSt6vectorINS_7fast_xyESaIS3_EEiRS2_IiSaIiEE(ptr noundef %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #0 {
  %6 = alloca [16 x i32], align 16
  %7 = tail call noundef i64 @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %7)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  %8 = mul nsw i32 %1, 3
  store i32 %8, ptr %6, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %6, i64 4
  %10 = add nsw i32 %8, 1
  store i32 %10, ptr %9, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %12 = shl nsw i32 %1, 1
  %13 = add nsw i32 %12, 2
  store i32 %13, ptr %11, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %6, i64 12
  %15 = add nsw i32 %1, 3
  store i32 %15, ptr %14, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %6, i64 16
  store i32 3, ptr %16, align 16, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %6, i64 20
  %18 = sub i32 3, %1
  store i32 %18, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %6, i64 24
  %20 = mul nsw i32 %1, -2
  %21 = add nsw i32 %20, 2
  store i32 %21, ptr %19, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %6, i64 28
  %23 = mul nsw i32 %1, -3
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %6, i64 32
  store i32 %23, ptr %25, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %6, i64 36
  %27 = add nsw i32 %23, -1
  store i32 %27, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %6, i64 40
  %29 = add nsw i32 %20, -2
  store i32 %29, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %6, i64 44
  %31 = sub i32 -3, %1
  store i32 %31, ptr %30, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %6, i64 48
  store i32 -3, ptr %32, align 16, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %6, i64 52
  %34 = add nsw i32 %1, -3
  store i32 %34, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %6, i64 56
  %36 = add nsw i32 %12, -2
  store i32 %36, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %6, i64 60
  %38 = add nsw i32 %8, -1
  store i32 %38, ptr %37, align 4, !tbaa !5
  %39 = tail call noundef i64 @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %.not = icmp eq i64 %39, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  ret void

.lr.ph:                                           ; preds = %5, %.lr.ph
  %40 = phi i64 [ %55, %.lr.ph ], [ 0, %5 ]
  %.030 = phi i32 [ %54, %.lr.ph ], [ 0, %5 ]
  %41 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %40) #4
  %42 = getelementptr inbounds i8, ptr %41, i64 2
  %43 = load i16, ptr %42, align 2, !tbaa !9
  %44 = sext i16 %43 to i32
  %45 = mul nsw i32 %44, %1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %0, i64 %46
  %48 = call noundef nonnull align 2 dereferenceable(4) ptr @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %40) #4
  %49 = load i16, ptr %48, align 2, !tbaa !12
  %50 = sext i16 %49 to i64
  %51 = getelementptr inbounds i8, ptr %47, i64 %50
  %52 = call noundef i32 @_ZN4fast20fast_corner_score_10EPKhPKii(ptr noundef %51, ptr noundef nonnull %6, i32 noundef %3)
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %40) #4
  store i32 %52, ptr %53, align 4, !tbaa !5
  %54 = add i32 %.030, 1
  %55 = zext i32 %54 to i64
  %56 = call noundef i64 @_ZNKSt6vectorIN4fast7fast_xyESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %57 = icmp ugt i64 %56, %55
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !13
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZN4fast20fast_corner_score_10EPKhPKii(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 2}
!10 = !{!"_ZTSN4fast7fast_xyE", !11, i64 0, !11, i64 2}
!11 = !{!"short", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass