; LLVM IR from mtsamis/box2d-optimized :: src/dynamics/b2_world.ll (ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color)

; 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.b2CircleShape = type { %class.b2Shape, %struct.b2Vec2 }
%class.b2Shape = type { ptr, i32, float }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%class.b2World = type { %class.b2BlockAllocator, %class.b2StackAllocator, %class.b2ContactManager, ptr, ptr, ptr, ptr, i32, i32, %struct.b2Vec2, i8, ptr, ptr, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.b2Profile }
%class.b2BlockAllocator = type { ptr, i32, i32, [14 x ptr] }
%class.b2StackAllocator = type <{ [102400 x i8], i32, i32, i32, [4 x i8], [32 x %struct.b2StackEntry], i32, [4 x i8] }>
%struct.b2StackEntry = type { ptr, i32, i8 }
%class.b2ContactManager = type { %class.b2BroadPhase, i32, ptr, ptr, ptr, ptr }
%class.b2BroadPhase = type <{ ptr, ptr, ptr, ptr, %struct.b2TreeNode, ptr, ptr, ptr, i32, i32, %class.b2IntHashTable, i32, i32, i8, [7 x i8] }>
%struct.b2TreeNode = type { ptr, ptr, ptr, ptr, %struct.b2AABB }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.b2IntHashTable = type <{ ptr, i32, [4 x i8] }>
%struct.b2Profile = type { float, float, float, float, float }
%class.b2EdgeShape = type <{ %class.b2Shape, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, i8, [7 x i8] }>
%class.b2PolygonShape = type <{ %class.b2Shape, %struct.b2Vec2, [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], i32, [4 x i8] }>

@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color = external hidden unnamed_addr constant [75 x i8], align 1

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

; 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.start.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(16) %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.b2Vec2, align 4
  %11 = alloca float, align 4
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca [8 x %struct.b2Vec2], align 16
  %20 = alloca i32, align 4
  %21 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call noundef i32 @_ZNK9b2Fixture7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(84) %23)
  switch i32 %24, label %129 [
    i32 0, label %25
    i32 1, label %45
    i32 2, label %82
  ]

25:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %26)
  store ptr %27, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %class.b2CircleShape, ptr %29, i32 0, i32 1
  %31 = call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store <2 x float> %31, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.b2Shape, ptr %32, i32 0, i32 2
  %34 = load float, ptr %33, align 4, !tbaa !9
  store float %34, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.b2Transform, ptr %35, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %37 = call <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %37, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %38 = getelementptr inbounds %class.b2World, ptr %22, i32 0, i32 12
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = load float, ptr %11, align 4, !tbaa !13
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = load ptr, ptr %39, align 8, !tbaa !27
  %43 = getelementptr inbounds ptr, ptr %42, i64 5
  %44 = load ptr, ptr %43, align 8
  call void %44(ptr noundef nonnull align 8 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %40, ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(16) %41)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %130

45:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %46)
  store ptr %47, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  %50 = getelementptr inbounds %class.b2EdgeShape, ptr %49, i32 0, i32 1
  %51 = call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(8) %50)
  store <2 x float> %51, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = getelementptr inbounds %class.b2EdgeShape, ptr %53, i32 0, i32 2
  %55 = call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(8) %54)
  store <2 x float> %55, ptr %16, align 4
  %56 = getelementptr inbounds %class.b2World, ptr %22, i32 0, i32 12
  %57 = load ptr, ptr %56, align 8, !tbaa !14
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load ptr, ptr %57, align 8, !tbaa !27
  %60 = getelementptr inbounds ptr, ptr %59, i64 7
  %61 = load ptr, ptr %60, align 8
  call void %61(ptr noundef nonnull align 8 dereferenceable(12) %57, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(16) %58)
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.b2EdgeShape, ptr %62, i32 0, i32 5
  %64 = load i8, ptr %63, align 8, !tbaa !29, !range !31, !noundef !32
  %65 = trunc i8 %64 to i1
  %66 = zext i1 %65 to i32
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %81

68:                                               ; preds = %45
  %69 = getelementptr inbounds %class.b2World, ptr %22, i32 0, i32 12
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %70, align 8, !tbaa !27
  %73 = getelementptr inbounds ptr, ptr %72, i64 9
  %74 = load ptr, ptr %73, align 8
  call void %74(ptr noundef nonnull align 8 dereferenceable(12) %70, ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 4.000000e+00, ptr noundef nonnull align 4 dereferenceable(16) %71)
  %75 = getelementptr inbounds %class.b2World, ptr %22, i32 0, i32 12
  %76 = load ptr, ptr %75, align 8, !tbaa !14
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %76, align 8, !tbaa !27
  %79 = getelementptr inbounds ptr, ptr %78, i64 9
  %80 = load ptr, ptr %79, align 8
  call void %80(ptr noundef nonnull align 8 dereferenceable(12) %76, ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef 4.000000e+00, ptr noundef nonnull align 4 dereferenceable(16) %77)
  br label %81

81:                                               ; preds = %68, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %130

82:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %83)
  store ptr %84, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.b2PolygonShape, ptr %85, i32 0, i32 4
  %87 = load i32, ptr %86, align 8, !tbaa !33
  store i32 %87, ptr %18, align 4, !tbaa !35
  %88 = load i32, ptr %18, align 4, !tbaa !35
  %89 = icmp sle i32 %88, 8
  br i1 %89, label %90, label %91

90:                                               ; preds = %82
  br label %93

91:                                               ; preds = %82
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 1282, ptr noundef @__PRETTY_FUNCTION__._ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color) #9
  unreachable

92:                                               ; No predecessors!
  br label %93

93:                                               ; preds = %92, %90
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #8
  %94 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %19, i32 0, i32 0
  %95 = getelementptr inbounds %struct.b2Vec2, ptr %94, i64 8
  br label %96

96:                                               ; preds = %96, %93
  %97 = phi ptr [ %94, %93 ], [ %98, %96 ]
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %97)
  %98 = getelementptr inbounds %struct.b2Vec2, ptr %97, i64 1
  %99 = icmp eq ptr %98, %95
  br i1 %99, label %100, label %96

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !35
  br label %101

101:                                              ; preds = %117, %100
  %102 = load i32, ptr %20, align 4, !tbaa !35
  %103 = load i32, ptr %18, align 4, !tbaa !35
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %120

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load ptr, ptr %17, align 8, !tbaa !5
  %109 = getelementptr inbounds %class.b2PolygonShape, ptr %108, i32 0, i32 2
  %110 = load i32, ptr %20, align 4, !tbaa !35
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %109, i64 0, i64 %111
  %113 = call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %107, ptr noundef nonnull align 4 dereferenceable(8) %112)
  store <2 x float> %113, ptr %21, align 4
  %114 = load i32, ptr %20, align 4, !tbaa !35
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %19, i64 0, i64 %115
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %117

117:                                              ; preds = %106
  %118 = load i32, ptr %20, align 4, !tbaa !35
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %20, align 4, !tbaa !35
  br label %101, !llvm.loop !37

120:                                              ; preds = %105
  %121 = getelementptr inbounds %class.b2World, ptr %22, i32 0, i32 12
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %19, i64 0, i64 0
  %124 = load i32, ptr %18, align 4, !tbaa !35
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load ptr, ptr %122, align 8, !tbaa !27
  %127 = getelementptr inbounds ptr, ptr %126, i64 3
  %128 = load ptr, ptr %127, align 8
  call void %128(ptr noundef nonnull align 8 dereferenceable(12) %122, ptr noundef %123, i32 noundef %124, ptr noundef nonnull align 4 dereferenceable(16) %125)
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %130

129:                                              ; preds = %4
  br label %130

130:                                              ; preds = %129, %120, %81, %25
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK9b2Fixture7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(84)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84)) #6 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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, !12, i64 12}
!10 = !{!"_ZTS7b2Shape", !11, i64 8, !12, i64 12}
!11 = !{!"_ZTSN7b2Shape4TypeE", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !6, i64 103312}
!15 = !{!"_ZTS7b2World", !16, i64 0, !18, i64 128, !19, i64 103064, !6, i64 103248, !6, i64 103256, !6, i64 103264, !6, i64 103272, !17, i64 103280, !17, i64 103284, !23, i64 103288, !25, i64 103296, !6, i64 103304, !6, i64 103312, !12, i64 103320, !25, i64 103324, !25, i64 103325, !25, i64 103326, !25, i64 103327, !25, i64 103328, !25, i64 103329, !25, i64 103330, !25, i64 103331, !26, i64 103332}
!16 = !{!"_ZTS16b2BlockAllocator", !6, i64 0, !17, i64 8, !17, i64 12, !7, i64 16}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTS16b2StackAllocator", !7, i64 0, !17, i64 102400, !17, i64 102404, !17, i64 102408, !7, i64 102416, !17, i64 102928}
!19 = !{!"_ZTS16b2ContactManager", !20, i64 0, !17, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!20 = !{!"_ZTS12b2BroadPhase", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !21, i64 32, !6, i64 80, !6, i64 88, !6, i64 96, !17, i64 104, !17, i64 108, !24, i64 112, !17, i64 128, !17, i64 132, !25, i64 136}
!21 = !{!"_ZTS10b2TreeNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !22, i64 32}
!22 = !{!"_ZTS6b2AABB", !23, i64 0, !23, i64 8}
!23 = !{!"_ZTS6b2Vec2", !12, i64 0, !12, i64 4}
!24 = !{!"_ZTS14b2IntHashTable", !6, i64 0, !17, i64 8}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTS9b2Profile", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !8, i64 0}
!29 = !{!30, !25, i64 48}
!30 = !{!"_ZTS11b2EdgeShape", !10, i64 0, !23, i64 16, !23, i64 24, !23, i64 32, !23, i64 40, !25, i64 48}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !17, i64 152}
!34 = !{!"_ZTS14b2PolygonShape", !10, i64 0, !23, i64 16, !7, i64 24, !7, i64 88, !17, i64 152}
!35 = !{!17, !17, i64 0}
!36 = !{i64 0, i64 4, !13, i64 4, i64 4, !13}
!37 = distinct !{!37, !38}
!38 = !{!"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 [83 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color = external hidden unnamed_addr constant [75 x i8], align 1

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr nocapture noundef nonnull readonly align 8 dereferenceable(103352) %0, ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(16) %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 4
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca [8 x %struct.b2Vec2], align 16
  %11 = tail call noundef i32 @_ZNK9b2Fixture7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  switch i32 %11, label %66 [
    i32 0, label %12
    i32 1, label %25
    i32 2, label %49
  ]

12:                                               ; preds = %4
  %13 = tail call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = tail call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %15, ptr %5, align 8
  %16 = getelementptr inbounds i8, ptr %13, i64 12
  %17 = load float, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %18 = getelementptr inbounds i8, ptr %2, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @_ZN6b2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %19 = call <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %19, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %20 = getelementptr inbounds i8, ptr %0, i64 103312
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = load ptr, ptr %21, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %22, i64 40
  %24 = load ptr, ptr %23, align 8
  call void %24(ptr noundef nonnull align 8 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %17, ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %66

25:                                               ; preds = %4
  %26 = tail call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = tail call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(8) %27)
  store <2 x float> %28, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %29 = getelementptr inbounds i8, ptr %26, i64 24
  %30 = tail call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(8) %29)
  store <2 x float> %30, ptr %9, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 103312
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %32, align 8, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %33, i64 56
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(16) %3)
  %36 = getelementptr inbounds i8, ptr %26, i64 48
  %37 = load i8, ptr %36, align 8, !tbaa !27, !range !29, !noundef !30
  %38 = icmp eq i8 %37, 0
  br i1 %38, label %39, label %48

39:                                               ; preds = %25
  %40 = load ptr, ptr %31, align 8, !tbaa !11
  %41 = load ptr, ptr %40, align 8, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %41, i64 72
  %43 = load ptr, ptr %42, align 8
  call void %43(ptr noundef nonnull align 8 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 4.000000e+00, ptr noundef nonnull align 4 dereferenceable(16) %3)
  %44 = load ptr, ptr %31, align 8, !tbaa !11
  %45 = load ptr, ptr %44, align 8, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %45, i64 72
  %47 = load ptr, ptr %46, align 8
  call void %47(ptr noundef nonnull align 8 dereferenceable(12) %44, ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 4.000000e+00, ptr noundef nonnull align 4 dereferenceable(16) %3)
  br label %48

48:                                               ; preds = %39, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %66

49:                                               ; preds = %4
  %50 = tail call noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84) %1)
  %51 = getelementptr inbounds i8, ptr %50, i64 152
  %52 = load i32, ptr %51, align 8, !tbaa !31
  %53 = icmp slt i32 %52, 9
  br i1 %53, label %.preheader, label %54

54:                                               ; preds = %49
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 1282, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color) #8
  unreachable

.preheader:                                       ; preds = %49
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %10)
  %.ptr.1 = getelementptr inbounds i8, ptr %10, i64 8
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %10, i64 16
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %10, i64 24
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %10, i64 32
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %10, i64 40
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %10, i64 48
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %10, i64 56
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.7)
  %55 = icmp sgt i32 %52, 0
  br i1 %55, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %56 = getelementptr inbounds i8, ptr %50, i64 24
  %wide.trip.count = zext nneg i32 %52 to i64
  br label %62

._crit_edge:                                      ; preds = %62, %.preheader
  %57 = getelementptr inbounds i8, ptr %0, i64 103312
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load ptr, ptr %58, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %59, i64 24
  %61 = load ptr, ptr %60, align 8
  call void %61(ptr noundef nonnull align 8 dereferenceable(12) %58, ptr noundef nonnull %10, i32 noundef %52, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  br label %66

62:                                               ; preds = %.lr.ph, %62
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %62 ]
  %63 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %56, i64 0, i64 %indvars.iv
  %64 = call <2 x float> @_Z5b2MulRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(8) %63)
  %65 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %10, i64 0, i64 %indvars.iv
  store <2 x float> %64, ptr %65, align 8
  %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 %62, !llvm.loop !33

66:                                               ; preds = %4, %._crit_edge, %48, %12
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK9b2Fixture7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #5 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync 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 = { 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 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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { noreturn 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, !10, i64 12}
!6 = !{!"_ZTS7b2Shape", !7, i64 8, !10, i64 12}
!7 = !{!"_ZTSN7b2Shape4TypeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!12, !14, i64 103312}
!12 = !{!"_ZTS7b2World", !13, i64 0, !16, i64 128, !17, i64 103064, !14, i64 103248, !14, i64 103256, !14, i64 103264, !14, i64 103272, !15, i64 103280, !15, i64 103284, !21, i64 103288, !23, i64 103296, !14, i64 103304, !14, i64 103312, !10, i64 103320, !23, i64 103324, !23, i64 103325, !23, i64 103326, !23, i64 103327, !23, i64 103328, !23, i64 103329, !23, i64 103330, !23, i64 103331, !24, i64 103332}
!13 = !{!"_ZTS16b2BlockAllocator", !14, i64 0, !15, i64 8, !15, i64 12, !8, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!"_ZTS16b2StackAllocator", !8, i64 0, !15, i64 102400, !15, i64 102404, !15, i64 102408, !8, i64 102416, !15, i64 102928}
!17 = !{!"_ZTS16b2ContactManager", !18, i64 0, !15, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176}
!18 = !{!"_ZTS12b2BroadPhase", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !19, i64 32, !14, i64 80, !14, i64 88, !14, i64 96, !15, i64 104, !15, i64 108, !22, i64 112, !15, i64 128, !15, i64 132, !23, i64 136}
!19 = !{!"_ZTS10b2TreeNode", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !20, i64 32}
!20 = !{!"_ZTS6b2AABB", !21, i64 0, !21, i64 8}
!21 = !{!"_ZTS6b2Vec2", !10, i64 0, !10, i64 4}
!22 = !{!"_ZTS14b2IntHashTable", !14, i64 0, !15, i64 8}
!23 = !{!"bool", !8, i64 0}
!24 = !{!"_ZTS9b2Profile", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!25 = !{!26, !26, i64 0}
!26 = !{!"vtable pointer", !9, i64 0}
!27 = !{!28, !23, i64 48}
!28 = !{!"_ZTS11b2EdgeShape", !6, i64 0, !21, i64 16, !21, i64 24, !21, i64 32, !21, i64 40, !23, i64 48}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!32, !15, i64 152}
!32 = !{!"_ZTS14b2PolygonShape", !6, i64 0, !21, i64 16, !8, i64 24, !8, i64 88, !15, i64 152}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass