; LLVM IR from mtsamis/box2d-optimized :: src/collision/b2_polygon_shape.ll (ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf)

; 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 }
%class.b2PolygonShape = type <{ %class.b2Shape, %struct.b2Vec2, [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], i32, [4 x i8] }>
%class.b2Shape = type { ptr, i32, float }
%struct.b2MassData = type { float, %struct.b2Vec2, float }

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf = external hidden unnamed_addr constant [68 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 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

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef %1, float noundef %2) unnamed_addr #6 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca %struct.b2Vec2, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca %struct.b2Vec2, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca %struct.b2Vec2, align 4
  %18 = alloca %struct.b2Vec2, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store float %2, ptr %6, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8
  %27 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 4
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp sge i32 %28, 3
  br i1 %29, label %30, label %31

30:                                               ; preds = %3
  br label %33

31:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 416, ptr noundef @__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf) #8
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  call void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store float 0.000000e+00, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store float 0.000000e+00, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %34 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 2
  %35 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %34, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %35, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store float 0x3FD5555560000000, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !18
  br label %36

36:                                               ; preds = %108, %33
  %37 = load i32, ptr %12, align 4, !tbaa !18
  %38 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 4
  %39 = load i32, ptr %38, align 8, !tbaa !11
  %40 = icmp slt i32 %37, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %111

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %43 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 2
  %44 = load i32, ptr %12, align 4, !tbaa !18
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %43, i64 0, i64 %45
  %47 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %46, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %47, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %48 = load i32, ptr %12, align 4, !tbaa !18
  %49 = add nsw i32 %48, 1
  %50 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 4
  %51 = load i32, ptr %50, align 8, !tbaa !11
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %53, label %60

53:                                               ; preds = %42
  %54 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 2
  %55 = load i32, ptr %12, align 4, !tbaa !18
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %54, i64 0, i64 %57
  %59 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %58, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %59, ptr %14, align 4
  br label %64

60:                                               ; preds = %42
  %61 = getelementptr inbounds %class.b2PolygonShape, ptr %26, i32 0, i32 2
  %62 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %61, i64 0, i64 0
  %63 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %62, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %63, ptr %14, align 4
  br label %64

64:                                               ; preds = %60, %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %65 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store float %65, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %66 = load float, ptr %15, align 4, !tbaa !9
  %67 = fmul float 5.000000e-01, %66
  store float %67, ptr %16, align 4, !tbaa !9
  %68 = load float, ptr %16, align 4, !tbaa !9
  %69 = load float, ptr %8, align 4, !tbaa !9
  %70 = fadd float %69, %68
  store float %70, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %71 = load float, ptr %16, align 4, !tbaa !9
  %72 = fmul float %71, 0x3FD5555560000000
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %73 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %73, ptr %18, align 4
  %74 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %72, ptr noundef nonnull align 4 dereferenceable(8) %18)
  store <2 x float> %74, ptr %17, align 4
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %75 = getelementptr inbounds %struct.b2Vec2, ptr %13, i32 0, i32 0
  %76 = load float, ptr %75, align 4, !tbaa !19
  store float %76, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %77 = getelementptr inbounds %struct.b2Vec2, ptr %13, i32 0, i32 1
  %78 = load float, ptr %77, align 4, !tbaa !20
  store float %78, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %79 = getelementptr inbounds %struct.b2Vec2, ptr %14, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !19
  store float %80, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %81 = getelementptr inbounds %struct.b2Vec2, ptr %14, i32 0, i32 1
  %82 = load float, ptr %81, align 4, !tbaa !20
  store float %82, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %83 = load float, ptr %19, align 4, !tbaa !9
  %84 = load float, ptr %19, align 4, !tbaa !9
  %85 = load float, ptr %21, align 4, !tbaa !9
  %86 = load float, ptr %19, align 4, !tbaa !9
  %87 = fmul float %85, %86
  %88 = call float @llvm.fmuladd.f32(float %83, float %84, float %87)
  %89 = load float, ptr %21, align 4, !tbaa !9
  %90 = load float, ptr %21, align 4, !tbaa !9
  %91 = call float @llvm.fmuladd.f32(float %89, float %90, float %88)
  store float %91, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %92 = load float, ptr %20, align 4, !tbaa !9
  %93 = load float, ptr %20, align 4, !tbaa !9
  %94 = load float, ptr %22, align 4, !tbaa !9
  %95 = load float, ptr %20, align 4, !tbaa !9
  %96 = fmul float %94, %95
  %97 = call float @llvm.fmuladd.f32(float %92, float %93, float %96)
  %98 = load float, ptr %22, align 4, !tbaa !9
  %99 = load float, ptr %22, align 4, !tbaa !9
  %100 = call float @llvm.fmuladd.f32(float %98, float %99, float %97)
  store float %100, ptr %24, align 4, !tbaa !9
  %101 = load float, ptr %15, align 4, !tbaa !9
  %102 = fmul float 0x3FB5555560000000, %101
  %103 = load float, ptr %23, align 4, !tbaa !9
  %104 = load float, ptr %24, align 4, !tbaa !9
  %105 = fadd float %103, %104
  %106 = load float, ptr %9, align 4, !tbaa !9
  %107 = call float @llvm.fmuladd.f32(float %102, float %105, float %106)
  store float %107, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %108

108:                                              ; preds = %64
  %109 = load i32, ptr %12, align 4, !tbaa !18
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %12, align 4, !tbaa !18
  br label %36, !llvm.loop !21

111:                                              ; preds = %41
  %112 = load float, ptr %6, align 4, !tbaa !9
  %113 = load float, ptr %8, align 4, !tbaa !9
  %114 = fmul float %112, %113
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.b2MassData, ptr %115, i32 0, i32 0
  store float %114, ptr %116, align 4, !tbaa !23
  %117 = load float, ptr %8, align 4, !tbaa !9
  %118 = fcmp ogt float %117, 0x3E80000000000000
  br i1 %118, label %119, label %120

119:                                              ; preds = %111
  br label %122

120:                                              ; preds = %111
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 455, ptr noundef @__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf) #8
  unreachable

121:                                              ; No predecessors!
  br label %122

122:                                              ; preds = %121, %119
  %123 = load float, ptr %8, align 4, !tbaa !9
  %124 = fdiv float 1.000000e+00, %123
  call void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %124)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %125 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %125, ptr %25, align 4
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.b2MassData, ptr %126, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %127, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  %128 = load float, ptr %6, align 4, !tbaa !9
  %129 = load float, ptr %9, align 4, !tbaa !9
  %130 = fmul float %128, %129
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.b2MassData, ptr %131, i32 0, i32 2
  store float %130, ptr %132, align 4, !tbaa !25
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.b2MassData, ptr %133, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !23
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.b2MassData, ptr %136, i32 0, i32 1
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.b2MassData, ptr %138, i32 0, i32 1
  %140 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %137, ptr noundef nonnull align 4 dereferenceable(8) %139)
  %141 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %142 = fsub float %140, %141
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.b2MassData, ptr %143, i32 0, i32 2
  %145 = load float, ptr %144, align 4, !tbaa !25
  %146 = call float @llvm.fmuladd.f32(float %135, float %142, float %145)
  store float %146, ptr %144, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmlfRK6b2Vec2(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "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 mustprogress 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 = { inlinehint 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 #5 = { 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 #6 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !16, i64 152}
!12 = !{!"_ZTS14b2PolygonShape", !13, i64 0, !15, i64 16, !7, i64 24, !7, i64 88, !16, i64 152}
!13 = !{!"_ZTS7b2Shape", !14, i64 8, !10, i64 12}
!14 = !{!"_ZTSN7b2Shape4TypeE", !7, i64 0}
!15 = !{!"_ZTS6b2Vec2", !10, i64 0, !10, i64 4}
!16 = !{!"int", !7, i64 0}
!17 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!18 = !{!16, !16, i64 0}
!19 = !{!15, !10, i64 0}
!20 = !{!15, !10, i64 4}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTS10b2MassData", !10, i64 0, !15, i64 4, !10, i64 12}
!25 = !{!24, !10, i64 12}


; 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 [92 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf = external hidden unnamed_addr constant [68 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf(ptr noundef nonnull align 8 dereferenceable(156) %0, ptr noundef %1, float noundef %2) unnamed_addr #5 align 2 {
  %4 = alloca %struct.b2Vec2, align 4
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 152
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = icmp sgt i32 %11, 2
  br i1 %12, label %14, label %13

13:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 416, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf) #8
  unreachable

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i64, ptr %15, align 8
  store i64 %16, ptr %5, align 8
  %17 = load i32, ptr %10, align 8, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %14
  %19 = fmul float %2, 0.000000e+00
  store float %19, ptr %1, align 4, !tbaa !14
  br label %47

._crit_edge:                                      ; preds = %.lr.ph
  %20 = fmul float %31, %2
  store float %20, ptr %1, align 4, !tbaa !14
  %21 = fcmp ogt float %31, 0x3E80000000000000
  br i1 %21, label %48, label %47

.lr.ph:                                           ; preds = %14, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %14 ]
  %.043 = phi float [ %31, %.lr.ph ], [ 0.000000e+00, %14 ]
  %.03842 = phi float [ %43, %.lr.ph ], [ 0.000000e+00, %14 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %22 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %15, i64 0, i64 %indvars.iv
  %23 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %23, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr %10, align 8, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  %27 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %15, i64 0, i64 %indvars.iv.next
  %.sink = select i1 %26, ptr %27, ptr %15
  %28 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %.sink, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %28, ptr %7, align 8
  %29 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %30 = fmul float %29, 5.000000e-01
  %31 = fadd float %.043, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %32 = fmul float %30, 0x3FD5555560000000
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %33 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %33, ptr %9, align 8
  %34 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %32, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %34, ptr %8, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  %35 = load <2 x float>, ptr %6, align 8, !tbaa !16
  %36 = load <2 x float>, ptr %7, align 8, !tbaa !16
  %37 = fmul <2 x float> %35, %36
  %38 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %35, <2 x float> %35, <2 x float> %37)
  %39 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %36, <2 x float> %36, <2 x float> %38)
  %40 = fmul float %29, 0x3FB5555560000000
  %shift = shufflevector <2 x float> %39, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %41 = fadd <2 x float> %39, %shift
  %42 = extractelement <2 x float> %41, i64 0
  %43 = call float @llvm.fmuladd.f32(float %40, float %42, float %.03842)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %44 = load i32, ptr %10, align 8, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next, %45
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !17

47:                                               ; preds = %._crit_edge.thread, %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 455, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK14b2PolygonShape11ComputeMassEP10b2MassDataf) #8
  unreachable

48:                                               ; preds = %._crit_edge
  %49 = fdiv float 1.000000e+00, %31
  call void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %49)
  %50 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  %51 = getelementptr inbounds i8, ptr %1, i64 4
  store <2 x float> %50, ptr %51, align 4
  %52 = fmul float %43, %2
  %53 = getelementptr inbounds i8, ptr %1, i64 12
  store float %52, ptr %53, align 4, !tbaa !19
  %54 = load float, ptr %1, align 4, !tbaa !14
  %55 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %51, ptr noundef nonnull align 4 dereferenceable(8) %51)
  %56 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %57 = fsub float %55, %56
  %58 = load float, ptr %53, align 4, !tbaa !19
  %59 = call float @llvm.fmuladd.f32(float %54, float %57, float %58)
  store float %59, ptr %53, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmlfRK6b2Vec2(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 = { inlinehint mustprogress 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 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 #4 = { 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 #5 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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, !13, i64 152}
!6 = !{!"_ZTS14b2PolygonShape", !7, i64 0, !12, i64 16, !9, i64 24, !9, i64 88, !13, i64 152}
!7 = !{!"_ZTS7b2Shape", !8, i64 8, !11, i64 12}
!8 = !{!"_ZTSN7b2Shape4TypeE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"float", !9, i64 0}
!12 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!13 = !{!"int", !9, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS10b2MassData", !11, i64 0, !12, i64 4, !11, i64 12}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!15, !11, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass