; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (point_parallel_hash_grid_searcher2)

; 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.jet::Vector" = type { double, double }
%"class.jet::PointParallelHashGridSearcher2" = type { %"class.jet::PointNeighborSearcher2", double, %"class.jet::Point", %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0" }
%"class.jet::PointNeighborSearcher2" = type { %"class.jet::Serializable" }
%"class.jet::Serializable" = type { ptr }
%"class.jet::Point" = type { i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_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<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3jet30PointParallelHashGridSearcher214hasNearbyPointERKNS_6VectorIdLm2EEEd(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca [4 x i64], align 16
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.jet::Vector", align 8
  %17 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #3
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  call void @_ZNK3jet30PointParallelHashGridSearcher213getNearbyKeysERKNS_6VectorIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(152) %18, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %21 = load double, ptr %7, align 8, !tbaa !9
  %22 = load double, ptr %7, align 8, !tbaa !9
  %23 = fmul double %21, %22
  store double %23, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %24

24:                                               ; preds = %74, %3
  %25 = load i32, ptr %10, align 4, !tbaa !11
  %26 = icmp slt i32 %25, 4
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 2, ptr %11, align 4
  br label %77

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %29 = load i32, ptr %10, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !13
  store i64 %32, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %33 = getelementptr inbounds %"class.jet::PointParallelHashGridSearcher2", ptr %18, i32 0, i32 5
  %34 = load i64, ptr %12, align 8, !tbaa !13
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %34) #3
  %36 = load i64, ptr %35, align 8, !tbaa !13
  store i64 %36, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %37 = getelementptr inbounds %"class.jet::PointParallelHashGridSearcher2", ptr %18, i32 0, i32 6
  %38 = load i64, ptr %12, align 8, !tbaa !13
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %38) #3
  %40 = load i64, ptr %39, align 8, !tbaa !13
  store i64 %40, ptr %14, align 8, !tbaa !13
  %41 = load i64, ptr %13, align 8, !tbaa !13
  %42 = icmp eq i64 %41, -1
  br i1 %42, label %43, label %44

43:                                               ; preds = %28
  store i32 4, ptr %11, align 4
  br label %71

44:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %45 = load i64, ptr %13, align 8, !tbaa !13
  store i64 %45, ptr %15, align 8, !tbaa !13
  br label %46

46:                                               ; preds = %65, %44
  %47 = load i64, ptr %15, align 8, !tbaa !13
  %48 = load i64, ptr %14, align 8, !tbaa !13
  %49 = icmp ult i64 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 5, ptr %11, align 4
  br label %68

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %52 = getelementptr inbounds %"class.jet::PointParallelHashGridSearcher2", ptr %18, i32 0, i32 3
  %53 = load i64, ptr %15, align 8, !tbaa !13
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %53) #3
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull align 8 dereferenceable(16) %55)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %56 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  store double %56, ptr %17, align 8, !tbaa !9
  %57 = load double, ptr %17, align 8, !tbaa !9
  %58 = load double, ptr %9, align 8, !tbaa !9
  %59 = fcmp ole double %57, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %51
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %62

61:                                               ; preds = %51
  store i32 0, ptr %11, align 4
  br label %62

62:                                               ; preds = %61, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  %63 = load i32, ptr %11, align 4
  switch i32 %63, label %68 [
    i32 0, label %64
  ]

64:                                               ; preds = %62
  br label %65

65:                                               ; preds = %64
  %66 = load i64, ptr %15, align 8, !tbaa !13
  %67 = add i64 %66, 1
  store i64 %67, ptr %15, align 8, !tbaa !13
  br label %46, !llvm.loop !15

68:                                               ; preds = %62, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %69 = load i32, ptr %11, align 4
  switch i32 %69, label %71 [
    i32 5, label %70
  ]

70:                                               ; preds = %68
  store i32 0, ptr %11, align 4
  br label %71

71:                                               ; preds = %70, %68, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %72 = load i32, ptr %11, align 4
  switch i32 %72, label %77 [
    i32 0, label %73
    i32 4, label %74
  ]

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73, %71
  %75 = load i32, ptr %10, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !11
  br label %24, !llvm.loop !17

77:                                               ; preds = %71, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %78 = load i32, ptr %11, align 4
  switch i32 %78, label %80 [
    i32 2, label %79
  ]

79:                                               ; preds = %77
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %80

80:                                               ; preds = %79, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  %81 = load i1, ptr %4, align 1
  ret i1 %81
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

%"class.jet::Vector" = type { double, double }

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3jet30PointParallelHashGridSearcher214hasNearbyPointERKNS_6VectorIdLm2EEEd(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2) unnamed_addr #1 align 2 {
  %4 = alloca [4 x i64], align 16
  %5 = alloca %"class.jet::Vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @_ZNK3jet30PointParallelHashGridSearcher213getNearbyKeysERKNS_6VectorIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull %4)
  %6 = fmul double %2, %2
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %8 = getelementptr inbounds i8, ptr %0, i64 104
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = load i64, ptr %4, align 16, !tbaa !5
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %10) #3
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %10) #3
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %15 = icmp ne i64 %12, -1
  %.not34 = icmp ult i64 %12, %14
  %or.cond = select i1 %15, i1 %.not34, i1 false
  br i1 %or.cond, label %.lr.ph, label %.loopexit

16:                                               ; preds = %.lr.ph
  %17 = add i64 %.02435, 1
  %exitcond.not = icmp eq i64 %17, %14
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !9

.lr.ph:                                           ; preds = %3, %16
  %.02435 = phi i64 [ %17, %16 ], [ %12, %3 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.02435) #3
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %19 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %20 = fcmp ugt double %19, %6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %20, label %16, label %.critedge

.loopexit:                                        ; preds = %16, %3
  %21 = getelementptr inbounds i8, ptr %4, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %22) #3
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %22) #3
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = icmp ne i64 %24, -1
  %.not34.1 = icmp ult i64 %24, %26
  %or.cond.1 = select i1 %27, i1 %.not34.1, i1 false
  br i1 %or.cond.1, label %.lr.ph.1, label %.loopexit.1

.lr.ph.1:                                         ; preds = %.loopexit, %31
  %.02435.1 = phi i64 [ %32, %31 ], [ %24, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.02435.1) #3
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %29 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %30 = fcmp ugt double %29, %6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %30, label %31, label %.critedge

31:                                               ; preds = %.lr.ph.1
  %32 = add i64 %.02435.1, 1
  %exitcond.1.not = icmp eq i64 %32, %26
  br i1 %exitcond.1.not, label %.loopexit.1, label %.lr.ph.1, !llvm.loop !9

.loopexit.1:                                      ; preds = %31, %.loopexit
  %33 = getelementptr inbounds i8, ptr %4, i64 16
  %34 = load i64, ptr %33, align 16, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34) #3
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %34) #3
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = icmp ne i64 %36, -1
  %.not34.2 = icmp ult i64 %36, %38
  %or.cond.2 = select i1 %39, i1 %.not34.2, i1 false
  br i1 %or.cond.2, label %.lr.ph.2, label %.loopexit.2

.lr.ph.2:                                         ; preds = %.loopexit.1, %43
  %.02435.2 = phi i64 [ %44, %43 ], [ %36, %.loopexit.1 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.02435.2) #3
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %41 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %42 = fcmp ugt double %41, %6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %42, label %43, label %.critedge

43:                                               ; preds = %.lr.ph.2
  %44 = add i64 %.02435.2, 1
  %exitcond.2.not = icmp eq i64 %44, %38
  br i1 %exitcond.2.not, label %.loopexit.2, label %.lr.ph.2, !llvm.loop !9

.loopexit.2:                                      ; preds = %43, %.loopexit.1
  %45 = getelementptr inbounds i8, ptr %4, i64 24
  %46 = load i64, ptr %45, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %46) #3
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %46) #3
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = icmp ne i64 %48, -1
  %.not34.3 = icmp ult i64 %48, %50
  %or.cond.3 = select i1 %51, i1 %.not34.3, i1 false
  br i1 %or.cond.3, label %.lr.ph.3, label %.critedge

.lr.ph.3:                                         ; preds = %.loopexit.2, %.lr.ph.3
  %.02435.3 = phi i64 [ %55, %.lr.ph.3 ], [ %48, %.loopexit.2 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.02435.3) #3
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm2EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %53 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %54 = fcmp ole double %53, %6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %55 = add i64 %.02435.3, 1
  %exitcond.3.not = icmp eq i64 %55, %50
  %or.cond53 = select i1 %54, i1 true, i1 %exitcond.3.not
  br i1 %or.cond53, label %.critedge, label %.lr.ph.3, !llvm.loop !9

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.1, %.lr.ph.2, %.lr.ph.3, %.loopexit.2
  %56 = phi i1 [ false, %.loopexit.2 ], [ %54, %.lr.ph.3 ], [ true, %.lr.ph.2 ], [ true, %.lr.ph.1 ], [ true, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  ret i1 %56
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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