; LLVM IR from erincatto/box2d :: src (distance)

; 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.b2SegmentDistanceResult = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2Vec2 = type { float, float }

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) #3

; Function Attrs: nounwind uwtable
define dso_local void @b2SegmentDistance(ptr dead_on_unwind noalias writable sret(%struct.b2SegmentDistanceResult) align 4 %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, <2 x float> %4) #4 {
  %6 = alloca %struct.b2Vec2, align 4
  %7 = alloca %struct.b2Vec2, align 4
  %8 = alloca %struct.b2Vec2, align 4
  %9 = alloca %struct.b2Vec2, align 4
  %10 = alloca %struct.b2Vec2, align 4
  %11 = alloca %struct.b2Vec2, align 4
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca %struct.b2Vec2, align 4
  store <2 x float> %1, ptr %6, align 4
  store <2 x float> %2, ptr %7, align 4
  store <2 x float> %3, ptr %8, align 4
  store <2 x float> %4, ptr %9, align 4
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 28, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %24 = load <2 x float>, ptr %7, align 4
  %25 = load <2 x float>, ptr %6, align 4
  %26 = call <2 x float> @b2Sub(<2 x float> %24, <2 x float> %25)
  store <2 x float> %26, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %27 = load <2 x float>, ptr %9, align 4
  %28 = load <2 x float>, ptr %8, align 4
  %29 = call <2 x float> @b2Sub(<2 x float> %27, <2 x float> %28)
  store <2 x float> %29, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %30 = load <2 x float>, ptr %6, align 4
  %31 = load <2 x float>, ptr %8, align 4
  %32 = call <2 x float> @b2Sub(<2 x float> %30, <2 x float> %31)
  store <2 x float> %32, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %33 = load <2 x float>, ptr %10, align 4
  %34 = load <2 x float>, ptr %10, align 4
  %35 = call float @b2Dot(<2 x float> %33, <2 x float> %34)
  store float %35, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %36 = load <2 x float>, ptr %11, align 4
  %37 = load <2 x float>, ptr %11, align 4
  %38 = call float @b2Dot(<2 x float> %36, <2 x float> %37)
  store float %38, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %39 = load <2 x float>, ptr %12, align 4
  %40 = load <2 x float>, ptr %10, align 4
  %41 = call float @b2Dot(<2 x float> %39, <2 x float> %40)
  store float %41, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %42 = load <2 x float>, ptr %12, align 4
  %43 = load <2 x float>, ptr %11, align 4
  %44 = call float @b2Dot(<2 x float> %42, <2 x float> %43)
  store float %44, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store float 0x3D10000000000000, ptr %17, align 4, !tbaa !5
  %45 = load float, ptr %13, align 4, !tbaa !5
  %46 = fcmp olt float %45, 0x3D10000000000000
  br i1 %46, label %50, label %47

47:                                               ; preds = %5
  %48 = load float, ptr %14, align 4, !tbaa !5
  %49 = fcmp olt float %48, 0x3D10000000000000
  br i1 %49, label %50, label %76

50:                                               ; preds = %47, %5
  %51 = load float, ptr %13, align 4, !tbaa !5
  %52 = fcmp oge float %51, 0x3D10000000000000
  br i1 %52, label %53, label %61

53:                                               ; preds = %50
  %54 = load float, ptr %15, align 4, !tbaa !5
  %55 = fneg float %54
  %56 = load float, ptr %13, align 4, !tbaa !5
  %57 = fdiv float %55, %56
  %58 = call float @b2ClampFloat(float noundef %57, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %59 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 2
  store float %58, ptr %59, align 4, !tbaa !9
  %60 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 3
  store float 0.000000e+00, ptr %60, align 4, !tbaa !12
  br label %75

61:                                               ; preds = %50
  %62 = load float, ptr %14, align 4, !tbaa !5
  %63 = fcmp oge float %62, 0x3D10000000000000
  br i1 %63, label %64, label %71

64:                                               ; preds = %61
  %65 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 2
  store float 0.000000e+00, ptr %65, align 4, !tbaa !9
  %66 = load float, ptr %16, align 4, !tbaa !5
  %67 = load float, ptr %14, align 4, !tbaa !5
  %68 = fdiv float %66, %67
  %69 = call float @b2ClampFloat(float noundef %68, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %70 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 3
  store float %69, ptr %70, align 4, !tbaa !12
  br label %74

71:                                               ; preds = %61
  %72 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 2
  store float 0.000000e+00, ptr %72, align 4, !tbaa !9
  %73 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 3
  store float 0.000000e+00, ptr %73, align 4, !tbaa !12
  br label %74

74:                                               ; preds = %71, %64
  br label %75

75:                                               ; preds = %74, %53
  br label %131

76:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %77 = load <2 x float>, ptr %10, align 4
  %78 = load <2 x float>, ptr %11, align 4
  %79 = call float @b2Dot(<2 x float> %77, <2 x float> %78)
  store float %79, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %80 = load float, ptr %13, align 4, !tbaa !5
  %81 = load float, ptr %14, align 4, !tbaa !5
  %82 = load float, ptr %18, align 4, !tbaa !5
  %83 = load float, ptr %18, align 4, !tbaa !5
  %84 = fmul float %82, %83
  %85 = fneg float %84
  %86 = call float @llvm.fmuladd.f32(float %80, float %81, float %85)
  store float %86, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store float 0.000000e+00, ptr %20, align 4, !tbaa !5
  %87 = load float, ptr %19, align 4, !tbaa !5
  %88 = fcmp une float %87, 0.000000e+00
  br i1 %88, label %89, label %100

89:                                               ; preds = %76
  %90 = load float, ptr %18, align 4, !tbaa !5
  %91 = load float, ptr %16, align 4, !tbaa !5
  %92 = load float, ptr %15, align 4, !tbaa !5
  %93 = load float, ptr %14, align 4, !tbaa !5
  %94 = fmul float %92, %93
  %95 = fneg float %94
  %96 = call float @llvm.fmuladd.f32(float %90, float %91, float %95)
  %97 = load float, ptr %19, align 4, !tbaa !5
  %98 = fdiv float %96, %97
  %99 = call float @b2ClampFloat(float noundef %98, float noundef 0.000000e+00, float noundef 1.000000e+00)
  store float %99, ptr %20, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %89, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %101 = load float, ptr %18, align 4, !tbaa !5
  %102 = load float, ptr %20, align 4, !tbaa !5
  %103 = load float, ptr %16, align 4, !tbaa !5
  %104 = call float @llvm.fmuladd.f32(float %101, float %102, float %103)
  %105 = load float, ptr %14, align 4, !tbaa !5
  %106 = fdiv float %104, %105
  store float %106, ptr %21, align 4, !tbaa !5
  %107 = load float, ptr %21, align 4, !tbaa !5
  %108 = fcmp olt float %107, 0.000000e+00
  br i1 %108, label %109, label %115

109:                                              ; preds = %100
  store float 0.000000e+00, ptr %21, align 4, !tbaa !5
  %110 = load float, ptr %15, align 4, !tbaa !5
  %111 = fneg float %110
  %112 = load float, ptr %13, align 4, !tbaa !5
  %113 = fdiv float %111, %112
  %114 = call float @b2ClampFloat(float noundef %113, float noundef 0.000000e+00, float noundef 1.000000e+00)
  store float %114, ptr %20, align 4, !tbaa !5
  br label %126

115:                                              ; preds = %100
  %116 = load float, ptr %21, align 4, !tbaa !5
  %117 = fcmp ogt float %116, 1.000000e+00
  br i1 %117, label %118, label %125

118:                                              ; preds = %115
  store float 1.000000e+00, ptr %21, align 4, !tbaa !5
  %119 = load float, ptr %18, align 4, !tbaa !5
  %120 = load float, ptr %15, align 4, !tbaa !5
  %121 = fsub float %119, %120
  %122 = load float, ptr %13, align 4, !tbaa !5
  %123 = fdiv float %121, %122
  %124 = call float @b2ClampFloat(float noundef %123, float noundef 0.000000e+00, float noundef 1.000000e+00)
  store float %124, ptr %20, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %118, %115
  br label %126

126:                                              ; preds = %125, %109
  %127 = load float, ptr %20, align 4, !tbaa !5
  %128 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 2
  store float %127, ptr %128, align 4, !tbaa !9
  %129 = load float, ptr %21, align 4, !tbaa !5
  %130 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 3
  store float %129, ptr %130, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %131

131:                                              ; preds = %126, %75
  %132 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %133 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 2
  %134 = load float, ptr %133, align 4, !tbaa !9
  %135 = load <2 x float>, ptr %6, align 4
  %136 = load <2 x float>, ptr %10, align 4
  %137 = call <2 x float> @b2MulAdd(<2 x float> %135, float noundef %134, <2 x float> %136)
  store <2 x float> %137, ptr %22, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %132, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  %138 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %139 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 3
  %140 = load float, ptr %139, align 4, !tbaa !12
  %141 = load <2 x float>, ptr %8, align 4
  %142 = load <2 x float>, ptr %11, align 4
  %143 = call <2 x float> @b2MulAdd(<2 x float> %141, float noundef %140, <2 x float> %142)
  store <2 x float> %143, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  %144 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 0
  %145 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 1
  %146 = load <2 x float>, ptr %144, align 4
  %147 = load <2 x float>, ptr %145, align 4
  %148 = call float @b2DistanceSquared(<2 x float> %146, <2 x float> %147)
  %149 = getelementptr inbounds %struct.b2SegmentDistanceResult, ptr %0, i32 0, i32 4
  store float %148, ptr %149, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2ClampFloat(float noundef, float noundef, float noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2DistanceSquared(<2 x float>, <2 x float>) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"b2SegmentDistanceResult", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 20, !6, i64 24}
!11 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!12 = !{!10, !6, i64 20}
!13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!14 = !{!10, !6, i64 24}


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

%struct.b2SegmentDistanceResult = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2Vec2 = type { float, float }

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @b2SegmentDistance(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.b2SegmentDistanceResult) align 4 %0, <2 x float> %1, <2 x float> %2, <2 x float> %3, <2 x float> %4) local_unnamed_addr #2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 0, ptr %6, align 4
  %7 = tail call <2 x float> @b2Sub(<2 x float> %2, <2 x float> %1)
  %8 = tail call <2 x float> @b2Sub(<2 x float> %4, <2 x float> %3)
  %9 = tail call <2 x float> @b2Sub(<2 x float> %1, <2 x float> %3)
  %10 = tail call float @b2Dot(<2 x float> %7, <2 x float> %7)
  %11 = tail call float @b2Dot(<2 x float> %8, <2 x float> %8)
  %12 = tail call float @b2Dot(<2 x float> %9, <2 x float> %7)
  %13 = tail call float @b2Dot(<2 x float> %9, <2 x float> %8)
  %14 = fcmp olt float %10, 0x3D10000000000000
  %15 = fcmp olt float %11, 0x3D10000000000000
  %or.cond = select i1 %14, i1 true, i1 %15
  br i1 %or.cond, label %16, label %29

16:                                               ; preds = %5
  %17 = fcmp ult float %10, 0x3D10000000000000
  br i1 %17, label %23, label %18

18:                                               ; preds = %16
  %19 = fneg float %12
  %20 = fdiv float %19, %10
  %21 = tail call float @b2ClampFloat(float noundef %20, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  store float %21, ptr %22, align 4, !tbaa !5
  br label %55

23:                                               ; preds = %16
  %24 = fcmp ult float %11, 0x3D10000000000000
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  store float 0.000000e+00, ptr %25, align 4, !tbaa !5
  br i1 %24, label %55, label %26

26:                                               ; preds = %23
  %27 = fdiv float %13, %11
  %28 = tail call float @b2ClampFloat(float noundef %27, float noundef 0.000000e+00, float noundef 1.000000e+00)
  br label %55

29:                                               ; preds = %5
  %30 = tail call float @b2Dot(<2 x float> %7, <2 x float> %8)
  %31 = fneg float %30
  %32 = fmul float %30, %31
  %33 = tail call float @llvm.fmuladd.f32(float %10, float %11, float %32)
  %34 = fcmp une float %33, 0.000000e+00
  br i1 %34, label %35, label %41

35:                                               ; preds = %29
  %36 = fneg float %12
  %37 = fmul float %11, %36
  %38 = tail call float @llvm.fmuladd.f32(float %30, float %13, float %37)
  %39 = fdiv float %38, %33
  %40 = tail call float @b2ClampFloat(float noundef %39, float noundef 0.000000e+00, float noundef 1.000000e+00)
  br label %41

41:                                               ; preds = %35, %29
  %.0 = phi float [ %40, %35 ], [ 0.000000e+00, %29 ]
  %42 = tail call float @llvm.fmuladd.f32(float %30, float %.0, float %13)
  %43 = fdiv float %42, %11
  %44 = fcmp olt float %43, 0.000000e+00
  br i1 %44, label %45, label %47

45:                                               ; preds = %41
  %46 = fneg float %12
  br label %.sink.split

47:                                               ; preds = %41
  %48 = fcmp ogt float %43, 1.000000e+00
  br i1 %48, label %49, label %53

49:                                               ; preds = %47
  %50 = fsub float %30, %12
  br label %.sink.split

.sink.split:                                      ; preds = %45, %49
  %.sink60 = phi float [ %50, %49 ], [ %46, %45 ]
  %.053.ph = phi float [ 1.000000e+00, %49 ], [ 0.000000e+00, %45 ]
  %51 = fdiv float %.sink60, %10
  %52 = tail call float @b2ClampFloat(float noundef %51, float noundef 0.000000e+00, float noundef 1.000000e+00)
  br label %53

53:                                               ; preds = %.sink.split, %47
  %.053 = phi float [ %43, %47 ], [ %.053.ph, %.sink.split ]
  %.1 = phi float [ %.0, %47 ], [ %52, %.sink.split ]
  %54 = getelementptr inbounds i8, ptr %0, i64 16
  store float %.1, ptr %54, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %23, %18, %26, %53
  %.sink = phi float [ 0.000000e+00, %18 ], [ %28, %26 ], [ %.053, %53 ], [ 0.000000e+00, %23 ]
  %56 = phi float [ %21, %18 ], [ 0.000000e+00, %26 ], [ %.1, %53 ], [ 0.000000e+00, %23 ]
  %57 = getelementptr inbounds i8, ptr %0, i64 20
  store float %.sink, ptr %57, align 4, !tbaa !11
  %58 = tail call <2 x float> @b2MulAdd(<2 x float> %1, float noundef %56, <2 x float> %7)
  store <2 x float> %58, ptr %0, align 4
  %59 = getelementptr inbounds i8, ptr %0, i64 8
  %60 = tail call <2 x float> @b2MulAdd(<2 x float> %3, float noundef %.sink, <2 x float> %8)
  store <2 x float> %60, ptr %59, align 4
  %61 = tail call float @b2DistanceSquared(<2 x float> %58, <2 x float> %60)
  %62 = getelementptr inbounds i8, ptr %0, i64 24
  store float %61, ptr %62, align 4, !tbaa !12
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2ClampFloat(float noundef, float noundef, float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2DistanceSquared(<2 x float>, <2 x float>) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { inlinehint 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" }

!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 16}
!6 = !{!"b2SegmentDistanceResult", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 20, !8, i64 24}
!7 = !{!"b2Vec2", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!6, !8, i64 20}
!12 = !{!6, !8, i64 24}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass