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

; 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.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Rot = type { float, float }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Hull = type { [8 x %struct.b2Vec2], i32 }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [48 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 zeroext i1 @b2ValidateHull(ptr noundef) #1

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: nounwind uwtable
declare dso_local void @b2MakeSquare(ptr dead_on_unwind noalias writable sret(%struct.b2Polygon) align 4, float noundef) #3

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

; 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) #5

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Normalize(<2 x float>) #6

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

; Function Attrs: nounwind uwtable
declare hidden <2 x float> @b2ComputePolygonCentroid(ptr noundef, i32 noundef) #7

; Function Attrs: nounwind uwtable
define dso_local void @b2MakeOffsetRoundedPolygon(ptr dead_on_unwind noalias writable sret(%struct.b2Polygon) align 4 %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, float noundef %4) #7 {
  %6 = alloca %struct.b2Vec2, align 4
  %7 = alloca %struct.b2Rot, align 4
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca %struct.b2Transform, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Vec2, align 4
  %18 = alloca %struct.b2Vec2, align 4
  %19 = alloca %struct.b2Vec2, align 4
  store <2 x float> %2, ptr %6, align 4
  store <2 x float> %3, ptr %7, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store float %4, ptr %9, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call zeroext i1 @b2ValidateHull(ptr noundef %21)
  br i1 %22, label %27, label %23

23:                                               ; preds = %20
  %24 = call i32 @b2InternalAssertFcn(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 98)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  call void @llvm.trap()
  br label %27

27:                                               ; preds = %26, %23, %20
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.b2Hull, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = icmp slt i32 %31, 3
  br i1 %32, label %33, label %34

33:                                               ; preds = %28
  call void @b2MakeSquare(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %0, float noundef 5.000000e-01)
  br label %129

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %35 = getelementptr inbounds %struct.b2Transform, ptr %10, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !14
  %36 = getelementptr inbounds %struct.b2Transform, ptr %10, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 144, i1 false)
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.b2Hull, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 4
  store i32 %39, ptr %40, align 4, !tbaa !15
  %41 = load float, ptr %9, align 4, !tbaa !9
  %42 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 3
  store float %41, ptr %42, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !19
  br label %43

43:                                               ; preds = %65, %34
  %44 = load i32, ptr %11, align 4, !tbaa !19
  %45 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 4
  %46 = load i32, ptr %45, align 4, !tbaa !15
  %47 = icmp slt i32 %44, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %68

49:                                               ; preds = %43
  %50 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 0
  %51 = load i32, ptr %11, align 4, !tbaa !19
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %50, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.b2Hull, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %11, align 4, !tbaa !19
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %55, i64 0, i64 %57
  %59 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 0
  %60 = load <2 x float>, ptr %59, align 4
  %61 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 1
  %62 = load <2 x float>, ptr %61, align 4
  %63 = load <2 x float>, ptr %58, align 4
  %64 = call <2 x float> @b2TransformPoint(<2 x float> %60, <2 x float> %62, <2 x float> %63)
  store <2 x float> %64, ptr %12, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %53, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %65

65:                                               ; preds = %49
  %66 = load i32, ptr %11, align 4, !tbaa !19
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %11, align 4, !tbaa !19
  br label %43, !llvm.loop !20

68:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !19
  br label %69

69:                                               ; preds = %119, %68
  %70 = load i32, ptr %13, align 4, !tbaa !19
  %71 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 4
  %72 = load i32, ptr %71, align 4, !tbaa !15
  %73 = icmp slt i32 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %122

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %76 = load i32, ptr %13, align 4, !tbaa !19
  store i32 %76, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %77 = load i32, ptr %13, align 4, !tbaa !19
  %78 = add nsw i32 %77, 1
  %79 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 4
  %80 = load i32, ptr %79, align 4, !tbaa !15
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %82, label %85

82:                                               ; preds = %75
  %83 = load i32, ptr %13, align 4, !tbaa !19
  %84 = add nsw i32 %83, 1
  br label %86

85:                                               ; preds = %75
  br label %86

86:                                               ; preds = %85, %82
  %87 = phi i32 [ %84, %82 ], [ 0, %85 ]
  store i32 %87, ptr %15, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %88 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 0
  %89 = load i32, ptr %15, align 4, !tbaa !19
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %88, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 0
  %93 = load i32, ptr %14, align 4, !tbaa !19
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %92, i64 0, i64 %94
  %96 = load <2 x float>, ptr %91, align 4
  %97 = load <2 x float>, ptr %95, align 4
  %98 = call <2 x float> @b2Sub(<2 x float> %96, <2 x float> %97)
  store <2 x float> %98, ptr %16, align 4
  br label %99

99:                                               ; preds = %86
  %100 = load <2 x float>, ptr %16, align 4
  %101 = load <2 x float>, ptr %16, align 4
  %102 = call float @b2Dot(<2 x float> %100, <2 x float> %101)
  %103 = fcmp ogt float %102, 0x3D10000000000000
  br i1 %103, label %108, label %104

104:                                              ; preds = %99
  %105 = call i32 @b2InternalAssertFcn(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 124)
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %104
  call void @llvm.trap()
  br label %108

108:                                              ; preds = %107, %104, %99
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  %111 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 1
  %112 = load i32, ptr %13, align 4, !tbaa !19
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %111, i64 0, i64 %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %115 = load <2 x float>, ptr %16, align 4
  %116 = call <2 x float> @b2CrossVS(<2 x float> %115, float noundef 1.000000e+00)
  store <2 x float> %116, ptr %18, align 4
  %117 = load <2 x float>, ptr %18, align 4
  %118 = call <2 x float> @b2Normalize(<2 x float> %117)
  store <2 x float> %118, ptr %17, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %114, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %119

119:                                              ; preds = %110
  %120 = load i32, ptr %13, align 4, !tbaa !19
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !19
  br label %69, !llvm.loop !22

122:                                              ; preds = %74
  %123 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %124 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 0
  %125 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %124, i64 0, i64 0
  %126 = getelementptr inbounds %struct.b2Polygon, ptr %0, i32 0, i32 4
  %127 = load i32, ptr %126, align 4, !tbaa !15
  %128 = call <2 x float> @b2ComputePolygonCentroid(ptr noundef %125, i32 noundef %127)
  store <2 x float> %128, ptr %19, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %123, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %129

129:                                              ; preds = %122, %33
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2TransformPoint(<2 x float>, <2 x float>, <2 x float>) #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 64}
!12 = !{!"b2Hull", !7, i64 0, !13, i64 64}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!15 = !{!16, !13, i64 140}
!16 = !{!"b2Polygon", !7, i64 0, !7, i64 64, !17, i64 128, !10, i64 136, !13, i64 140}
!17 = !{!"b2Vec2", !10, i64 0, !10, i64 4}
!18 = !{!16, !10, i64 136}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%struct.b2Vec2 = type { float, float }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [48 x i8], align 1

declare zeroext i1 @b2ValidateHull(ptr noundef) local_unnamed_addr #0

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: nounwind uwtable
declare dso_local void @b2MakeSquare(ptr dead_on_unwind noalias writable sret(%struct.b2Polygon) align 4, float noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden <2 x float> @b2ComputePolygonCentroid(ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local void @b2MakeOffsetRoundedPolygon(ptr dead_on_unwind noalias writable sret(%struct.b2Polygon) align 4 %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, float noundef %4) local_unnamed_addr #5 {
  %6 = tail call zeroext i1 @b2ValidateHull(ptr noundef %1) #6
  br i1 %6, label %10, label %7

7:                                                ; preds = %5
  %8 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 98) #6
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %10, label %9

9:                                                ; preds = %7
  tail call void @llvm.trap()
  unreachable

10:                                               ; preds = %5, %7
  %11 = getelementptr inbounds i8, ptr %1, i64 64
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 3
  br i1 %13, label %14, label %.lr.ph.preheader

14:                                               ; preds = %10
  tail call void @b2MakeSquare(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %0, float noundef 5.000000e-01)
  br label %51

.lr.ph.preheader:                                 ; preds = %10
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(144) %0, i8 0, i64 136, i1 false)
  %15 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 %12, ptr %15, align 4, !tbaa !10
  %16 = getelementptr inbounds i8, ptr %0, i64 136
  store float %4, ptr %16, align 4, !tbaa !14
  br label %.lr.ph

.preheader:                                       ; preds = %.lr.ph
  %17 = icmp sgt i32 %23, 0
  br i1 %17, label %.lr.ph31, label %._crit_edge

.lr.ph31:                                         ; preds = %.preheader
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  br label %28

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %19 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %0, i64 0, i64 %indvars.iv
  %20 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %1, i64 0, i64 %indvars.iv
  %21 = load <2 x float>, ptr %20, align 4
  %22 = tail call <2 x float> @b2TransformPoint(<2 x float> %2, <2 x float> %3, <2 x float> %21)
  store <2 x float> %22, ptr %19, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %15, align 4, !tbaa !10
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next, %24
  br i1 %25, label %.lr.ph, label %.preheader, !llvm.loop !15

._crit_edge:                                      ; preds = %44, %.preheader
  %.lcssa = phi i32 [ %23, %.preheader ], [ %48, %44 ]
  %26 = getelementptr inbounds i8, ptr %0, i64 128
  %27 = tail call <2 x float> @b2ComputePolygonCentroid(ptr noundef nonnull %0, i32 noundef %.lcssa)
  store <2 x float> %27, ptr %26, align 4
  br label %51

28:                                               ; preds = %.lr.ph31, %44
  %indvars.iv34 = phi i64 [ 0, %.lr.ph31 ], [ %indvars.iv.next35, %44 ]
  %29 = phi i32 [ %23, %.lr.ph31 ], [ %48, %44 ]
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next35, %30
  %32 = and i64 %indvars.iv.next35, 4294967295
  %33 = select i1 %31, i64 %32, i64 0
  %34 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %0, i64 0, i64 %33
  %35 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %0, i64 0, i64 %indvars.iv34
  %36 = load <2 x float>, ptr %34, align 4
  %37 = load <2 x float>, ptr %35, align 4
  %38 = tail call <2 x float> @b2Sub(<2 x float> %36, <2 x float> %37)
  %39 = tail call float @b2Dot(<2 x float> %38, <2 x float> %38)
  %40 = fcmp ogt float %39, 0x3D10000000000000
  br i1 %40, label %44, label %41

41:                                               ; preds = %28
  %42 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 124) #6
  %.not27 = icmp eq i32 %42, 0
  br i1 %.not27, label %44, label %43

43:                                               ; preds = %41
  tail call void @llvm.trap()
  unreachable

44:                                               ; preds = %41, %28
  %45 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %18, i64 0, i64 %indvars.iv34
  %46 = tail call <2 x float> @b2CrossVS(<2 x float> %38, float noundef 1.000000e+00)
  %47 = tail call <2 x float> @b2Normalize(<2 x float> %46)
  store <2 x float> %47, ptr %45, align 4
  %48 = load i32, ptr %15, align 4, !tbaa !10
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next35, %49
  br i1 %50, label %28, label %._crit_edge, !llvm.loop !17

51:                                               ; preds = %._crit_edge, %14
  ret void
}

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

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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = { 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, !9, i64 64}
!6 = !{!"b2Hull", !7, i64 0, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!11, !9, i64 140}
!11 = !{!"b2Polygon", !7, i64 0, !7, i64 64, !12, i64 128, !13, i64 136, !9, i64 140}
!12 = !{!"b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!11, !13, i64 136}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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