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

; 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.b2Vec2 = type { float, float }
%struct.b2Shape = type { i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, %struct.b2AABB, %struct.b2AABB, %struct.b2Vec2, i32, %struct.b2Filter, ptr, i32, %union.anon.0, i16, i8, i8, i8, i8, i8 }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Filter = type { i64, i64, i32 }
%union.anon.0 = type { %struct.b2Polygon }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%struct.b2Capsule = type { %struct.b2Vec2, %struct.b2Vec2, float }
%struct.b2Circle = type { %struct.b2Vec2, float }
%struct.b2Segment = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2ChainSegment = type { %struct.b2Vec2, %struct.b2Segment, %struct.b2Vec2, i32 }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1

; 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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #2

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

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

; Function Attrs: nounwind uwtable
define dso_local float @b2GetShapeProjectedPerimeter(ptr noundef %0, <2 x float> %1) #5 {
  %3 = alloca float, align 4
  %4 = alloca %struct.b2Vec2, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.b2Vec2, align 4
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  store <2 x float> %1, ptr %4, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.b2Shape, ptr %18, i32 0, i32 5
  %20 = load i32, ptr %19, align 4, !tbaa !9
  switch i32 %20, label %140 [
    i32 1, label %21
    i32 0, label %41
    i32 3, label %47
    i32 2, label %104
    i32 4, label %121
  ]

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.b2Shape, ptr %22, i32 0, i32 19
  %24 = getelementptr inbounds %struct.b2Capsule, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.b2Shape, ptr %25, i32 0, i32 19
  %27 = getelementptr inbounds %struct.b2Capsule, ptr %26, i32 0, i32 0
  %28 = load <2 x float>, ptr %24, align 4
  %29 = load <2 x float>, ptr %27, align 4
  %30 = call <2 x float> @b2Sub(<2 x float> %28, <2 x float> %29)
  store <2 x float> %30, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %31 = load <2 x float>, ptr %6, align 4
  %32 = load <2 x float>, ptr %4, align 4
  %33 = call float @b2Dot(<2 x float> %31, <2 x float> %32)
  %34 = call float @b2AbsFloat(float noundef %33)
  store float %34, ptr %7, align 4, !tbaa !19
  %35 = load float, ptr %7, align 4, !tbaa !19
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.b2Shape, ptr %36, i32 0, i32 19
  %38 = getelementptr inbounds %struct.b2Capsule, ptr %37, i32 0, i32 2
  %39 = load float, ptr %38, align 4, !tbaa !20
  %40 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %39, float %35)
  store float %40, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %141

41:                                               ; preds = %2
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.b2Shape, ptr %42, i32 0, i32 19
  %44 = getelementptr inbounds %struct.b2Circle, ptr %43, i32 0, i32 1
  %45 = load float, ptr %44, align 4, !tbaa !20
  %46 = fmul float 2.000000e+00, %45
  store float %46, ptr %3, align 4
  br label %141

47:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.b2Shape, ptr %48, i32 0, i32 19
  %50 = getelementptr inbounds %struct.b2Polygon, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %50, i64 0, i64 0
  store ptr %51, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.b2Shape, ptr %52, i32 0, i32 19
  %54 = getelementptr inbounds %struct.b2Polygon, ptr %53, i32 0, i32 4
  %55 = load i32, ptr %54, align 4, !tbaa !20
  store i32 %55, ptr %9, align 4, !tbaa !21
  br label %56

56:                                               ; preds = %47
  %57 = load i32, ptr %9, align 4, !tbaa !21
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %63, label %59

59:                                               ; preds = %56
  %60 = call i32 @b2InternalAssertFcn(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 674)
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  call void @llvm.trap()
  br label %63

63:                                               ; preds = %62, %59, %56
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.b2Vec2, ptr %66, i64 0
  %68 = load <2 x float>, ptr %67, align 4
  %69 = load <2 x float>, ptr %4, align 4
  %70 = call float @b2Dot(<2 x float> %68, <2 x float> %69)
  store float %70, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %71 = load float, ptr %10, align 4, !tbaa !19
  store float %71, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %72 = load float, ptr %10, align 4, !tbaa !19
  store float %72, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !21
  br label %73

73:                                               ; preds = %92, %65
  %74 = load i32, ptr %13, align 4, !tbaa !21
  %75 = load i32, ptr %9, align 4, !tbaa !21
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %95

78:                                               ; preds = %73
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i32, ptr %13, align 4, !tbaa !21
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds %struct.b2Vec2, ptr %79, i64 %81
  %83 = load <2 x float>, ptr %82, align 4
  %84 = load <2 x float>, ptr %4, align 4
  %85 = call float @b2Dot(<2 x float> %83, <2 x float> %84)
  store float %85, ptr %10, align 4, !tbaa !19
  %86 = load float, ptr %11, align 4, !tbaa !19
  %87 = load float, ptr %10, align 4, !tbaa !19
  %88 = call float @b2MinFloat(float noundef %86, float noundef %87)
  store float %88, ptr %11, align 4, !tbaa !19
  %89 = load float, ptr %12, align 4, !tbaa !19
  %90 = load float, ptr %10, align 4, !tbaa !19
  %91 = call float @b2MaxFloat(float noundef %89, float noundef %90)
  store float %91, ptr %12, align 4, !tbaa !19
  br label %92

92:                                               ; preds = %78
  %93 = load i32, ptr %13, align 4, !tbaa !21
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %13, align 4, !tbaa !21
  br label %73, !llvm.loop !22

95:                                               ; preds = %77
  %96 = load float, ptr %12, align 4, !tbaa !19
  %97 = load float, ptr %11, align 4, !tbaa !19
  %98 = fsub float %96, %97
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.b2Shape, ptr %99, i32 0, i32 19
  %101 = getelementptr inbounds %struct.b2Polygon, ptr %100, i32 0, i32 3
  %102 = load float, ptr %101, align 4, !tbaa !20
  %103 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %102, float %98)
  store float %103, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %141

104:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2Shape, ptr %105, i32 0, i32 19
  %107 = getelementptr inbounds %struct.b2Segment, ptr %106, i32 0, i32 0
  %108 = load <2 x float>, ptr %107, align 4
  %109 = load <2 x float>, ptr %4, align 4
  %110 = call float @b2Dot(<2 x float> %108, <2 x float> %109)
  store float %110, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.b2Shape, ptr %111, i32 0, i32 19
  %113 = getelementptr inbounds %struct.b2Segment, ptr %112, i32 0, i32 1
  %114 = load <2 x float>, ptr %113, align 4
  %115 = load <2 x float>, ptr %4, align 4
  %116 = call float @b2Dot(<2 x float> %114, <2 x float> %115)
  store float %116, ptr %15, align 4, !tbaa !19
  %117 = load float, ptr %15, align 4, !tbaa !19
  %118 = load float, ptr %14, align 4, !tbaa !19
  %119 = fsub float %117, %118
  %120 = call float @b2AbsFloat(float noundef %119)
  store float %120, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %141

121:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.b2Shape, ptr %122, i32 0, i32 19
  %124 = getelementptr inbounds %struct.b2ChainSegment, ptr %123, i32 0, i32 1
  %125 = getelementptr inbounds %struct.b2Segment, ptr %124, i32 0, i32 0
  %126 = load <2 x float>, ptr %125, align 4
  %127 = load <2 x float>, ptr %4, align 4
  %128 = call float @b2Dot(<2 x float> %126, <2 x float> %127)
  store float %128, ptr %16, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.b2Shape, ptr %129, i32 0, i32 19
  %131 = getelementptr inbounds %struct.b2ChainSegment, ptr %130, i32 0, i32 1
  %132 = getelementptr inbounds %struct.b2Segment, ptr %131, i32 0, i32 1
  %133 = load <2 x float>, ptr %132, align 4
  %134 = load <2 x float>, ptr %4, align 4
  %135 = call float @b2Dot(<2 x float> %133, <2 x float> %134)
  store float %135, ptr %17, align 4, !tbaa !19
  %136 = load float, ptr %17, align 4, !tbaa !19
  %137 = load float, ptr %16, align 4, !tbaa !19
  %138 = fsub float %136, %137
  %139 = call float @b2AbsFloat(float noundef %138)
  store float %139, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %141

140:                                              ; preds = %2
  store float 0.000000e+00, ptr %3, align 4
  br label %141

141:                                              ; preds = %140, %121, %104, %95, %41, %21
  %142 = load float, ptr %3, align 4
  ret float %142
}

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 20}
!10 = !{!"b2Shape", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !11, i64 44, !13, i64 48, !13, i64 64, !14, i64 80, !11, i64 88, !15, i64 96, !6, i64 120, !11, i64 128, !7, i64 132, !17, i64 276, !18, i64 278, !18, i64 279, !18, i64 280, !18, i64 281, !18, i64 282}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"b2AABB", !14, i64 0, !14, i64 8}
!14 = !{!"b2Vec2", !12, i64 0, !12, i64 4}
!15 = !{!"b2Filter", !16, i64 0, !16, i64 8, !11, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!11, !11, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"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"

%struct.b2Vec2 = type { float, float }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #1

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

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

; Function Attrs: nounwind uwtable
define dso_local float @b2GetShapeProjectedPerimeter(ptr nocapture noundef readonly %0, <2 x float> %1) local_unnamed_addr #4 {
  %3 = getelementptr inbounds i8, ptr %0, i64 20
  %4 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %4, label %60 [
    i32 1, label %5
    i32 0, label %16
    i32 3, label %20
    i32 2, label %42
    i32 4, label %51
  ]

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 132
  %7 = getelementptr inbounds i8, ptr %0, i64 140
  %8 = load <2 x float>, ptr %7, align 4
  %9 = load <2 x float>, ptr %6, align 4
  %10 = tail call <2 x float> @b2Sub(<2 x float> %8, <2 x float> %9)
  %11 = tail call float @b2Dot(<2 x float> %10, <2 x float> %1)
  %12 = tail call float @b2AbsFloat(float noundef %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 148
  %14 = load float, ptr %13, align 4, !tbaa !18
  %15 = tail call float @llvm.fmuladd.f32(float %14, float 2.000000e+00, float %12)
  br label %60

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 140
  %18 = load float, ptr %17, align 4, !tbaa !18
  %19 = fmul float %18, 2.000000e+00
  br label %60

20:                                               ; preds = %2
  %21 = getelementptr inbounds i8, ptr %0, i64 132
  %22 = getelementptr inbounds i8, ptr %0, i64 272
  %23 = load i32, ptr %22, align 4, !tbaa !18
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %30, label %25

25:                                               ; preds = %20
  %26 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 674) #6
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %.thread, label %29

.thread:                                          ; preds = %25
  %27 = load <2 x float>, ptr %21, align 4
  %28 = tail call float @b2Dot(<2 x float> %27, <2 x float> %1)
  br label %._crit_edge

29:                                               ; preds = %25
  tail call void @llvm.trap()
  unreachable

30:                                               ; preds = %20
  %31 = load <2 x float>, ptr %21, align 4
  %32 = tail call float @b2Dot(<2 x float> %31, <2 x float> %1)
  %.not49 = icmp eq i32 %23, 1
  br i1 %.not49, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %30
  %wide.trip.count = zext nneg i32 %23 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.thread, %30
  %.040.lcssa = phi float [ %32, %30 ], [ %28, %.thread ], [ %41, %.lr.ph ]
  %.039.lcssa = phi float [ %32, %30 ], [ %28, %.thread ], [ %40, %.lr.ph ]
  %33 = fsub float %.040.lcssa, %.039.lcssa
  %34 = getelementptr inbounds i8, ptr %0, i64 268
  %35 = load float, ptr %34, align 4, !tbaa !18
  %36 = tail call float @llvm.fmuladd.f32(float %35, float 2.000000e+00, float %33)
  br label %60

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.03944 = phi float [ %32, %.lr.ph.preheader ], [ %40, %.lr.ph ]
  %.04043 = phi float [ %32, %.lr.ph.preheader ], [ %41, %.lr.ph ]
  %37 = getelementptr inbounds %struct.b2Vec2, ptr %21, i64 %indvars.iv
  %38 = load <2 x float>, ptr %37, align 4
  %39 = tail call float @b2Dot(<2 x float> %38, <2 x float> %1)
  %40 = tail call float @b2MinFloat(float noundef %.03944, float noundef %39)
  %41 = tail call float @b2MaxFloat(float noundef %.04043, float noundef %39)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !19

42:                                               ; preds = %2
  %43 = getelementptr inbounds i8, ptr %0, i64 132
  %44 = load <2 x float>, ptr %43, align 4
  %45 = tail call float @b2Dot(<2 x float> %44, <2 x float> %1)
  %46 = getelementptr inbounds i8, ptr %0, i64 140
  %47 = load <2 x float>, ptr %46, align 4
  %48 = tail call float @b2Dot(<2 x float> %47, <2 x float> %1)
  %49 = fsub float %48, %45
  %50 = tail call float @b2AbsFloat(float noundef %49)
  br label %60

51:                                               ; preds = %2
  %52 = getelementptr inbounds i8, ptr %0, i64 140
  %53 = load <2 x float>, ptr %52, align 4
  %54 = tail call float @b2Dot(<2 x float> %53, <2 x float> %1)
  %55 = getelementptr inbounds i8, ptr %0, i64 148
  %56 = load <2 x float>, ptr %55, align 4
  %57 = tail call float @b2Dot(<2 x float> %56, <2 x float> %1)
  %58 = fsub float %57, %54
  %59 = tail call float @b2AbsFloat(float noundef %58)
  br label %60

60:                                               ; preds = %2, %51, %42, %._crit_edge, %16, %5
  %.0 = phi float [ %59, %51 ], [ %50, %42 ], [ %36, %._crit_edge ], [ %19, %16 ], [ %15, %5 ], [ 0.000000e+00, %2 ]
  ret float %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2AbsFloat(float noundef) local_unnamed_addr #5

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

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

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

attributes #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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #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, !7, i64 20}
!6 = !{!"b2Shape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !7, i64 44, !11, i64 48, !11, i64 64, !12, i64 80, !7, i64 88, !13, i64 96, !15, i64 120, !7, i64 128, !8, i64 132, !16, i64 276, !17, i64 278, !17, i64 279, !17, i64 280, !17, i64 281, !17, i64 282}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"b2AABB", !12, i64 0, !12, i64 8}
!12 = !{!"b2Vec2", !10, i64 0, !10, i64 4}
!13 = !{!"b2Filter", !14, i64 0, !14, i64 8, !7, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"short", !8, i64 0}
!17 = !{!"_Bool", !8, i64 0}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass