; LLVM IR from VTIvanov20/eight-ball-pool :: src (main)

; 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.Vector2 = type { float, float }
%struct.Matrix2x2 = type { float, float, float, float }
%struct.PhysicsVertexData = type { i32, [24 x %struct.Vector2], [24 x %struct.Vector2] }
%struct.PhysicsBodyData = type { i32, i8, %struct.Vector2, %struct.Vector2, %struct.Vector2, float, float, float, float, float, float, float, float, float, float, i8, i8, i8, %struct.PhysicsShape }
%struct.PhysicsShape = type { i32, ptr, %struct.PhysicsVertexData, float, %struct.Matrix2x2 }

@_ZL10usedMemory = external hidden global i32, align 4
@_ZL6bodies = external hidden global [64 x ptr], align 16
@_ZL18physicsBodiesCount = external hidden global i32, align 4
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [71 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @CreatePhysicsBodyPolygon(<2 x float> %0, float noundef %1, i32 noundef %2, float noundef %3) #2 {
  %5 = alloca %struct.Vector2, align 4
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.Vector2, align 4
  %12 = alloca %struct.Vector2, align 4
  %13 = alloca %struct.Matrix2x2, align 4
  %14 = alloca %struct.PhysicsVertexData, align 4
  %15 = alloca %struct.Vector2, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.Vector2, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.Vector2, align 4
  %22 = alloca float, align 4
  %23 = alloca %struct.Vector2, align 4
  %24 = alloca %struct.Vector2, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca i32, align 4
  store <2 x float> %0, ptr %5, align 4
  store float %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %29 = call noalias ptr @malloc(i64 noundef 504) #10
  store ptr %29, ptr %9, align 8, !tbaa !11
  %30 = load i32, ptr @_ZL10usedMemory, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = add i64 %31, 504
  %33 = trunc i64 %32 to i32
  store i32 %33, ptr @_ZL10usedMemory, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %34 = call noundef i32 @_ZL22FindAvailableBodyIndexv()
  store i32 %34, ptr %10, align 4, !tbaa !9
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp ne i32 %35, -1
  br i1 %36, label %37, label %296

37:                                               ; preds = %4
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = load ptr, ptr %9, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct.PhysicsBodyData, ptr %39, i32 0, i32 0
  store i32 %38, ptr %40, align 8, !tbaa !13
  %41 = load ptr, ptr %9, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.PhysicsBodyData, ptr %41, i32 0, i32 1
  store i8 1, ptr %42, align 4, !tbaa !21
  %43 = load ptr, ptr %9, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.PhysicsBodyData, ptr %43, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %45 = getelementptr inbounds %struct.Vector2, ptr %11, i32 0, i32 0
  store float 0.000000e+00, ptr %45, align 4, !tbaa !23
  %46 = getelementptr inbounds %struct.Vector2, ptr %11, i32 0, i32 1
  store float 0.000000e+00, ptr %46, align 4, !tbaa !24
  %47 = load ptr, ptr %9, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.PhysicsBodyData, ptr %47, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %49 = getelementptr inbounds %struct.Vector2, ptr %12, i32 0, i32 0
  store float 0.000000e+00, ptr %49, align 4, !tbaa !23
  %50 = getelementptr inbounds %struct.Vector2, ptr %12, i32 0, i32 1
  store float 0.000000e+00, ptr %50, align 4, !tbaa !24
  %51 = load ptr, ptr %9, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.PhysicsBodyData, ptr %51, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %53 = load ptr, ptr %9, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.PhysicsBodyData, ptr %53, i32 0, i32 5
  store float 0.000000e+00, ptr %54, align 8, !tbaa !25
  %55 = load ptr, ptr %9, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.PhysicsBodyData, ptr %55, i32 0, i32 6
  store float 0.000000e+00, ptr %56, align 4, !tbaa !26
  %57 = load ptr, ptr %9, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.PhysicsBodyData, ptr %57, i32 0, i32 7
  store float 0.000000e+00, ptr %58, align 8, !tbaa !27
  %59 = load ptr, ptr %9, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct.PhysicsBodyData, ptr %59, i32 0, i32 18
  %61 = getelementptr inbounds %struct.PhysicsShape, ptr %60, i32 0, i32 0
  store i32 1, ptr %61, align 8, !tbaa !28
  %62 = load ptr, ptr %9, align 8, !tbaa !11
  %63 = load ptr, ptr %9, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.PhysicsBodyData, ptr %63, i32 0, i32 18
  %65 = getelementptr inbounds %struct.PhysicsShape, ptr %64, i32 0, i32 1
  store ptr %62, ptr %65, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  %66 = call { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef 0.000000e+00)
  %67 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %68 = extractvalue { <2 x float>, <2 x float> } %66, 0
  store <2 x float> %68, ptr %67, align 4
  %69 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %70 = extractvalue { <2 x float>, <2 x float> } %66, 1
  store <2 x float> %70, ptr %69, align 4
  %71 = load ptr, ptr %9, align 8, !tbaa !11
  %72 = getelementptr inbounds %struct.PhysicsBodyData, ptr %71, i32 0, i32 18
  %73 = getelementptr inbounds %struct.PhysicsShape, ptr %72, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %73, ptr align 4 %13, i64 16, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 388, ptr %14) #9
  %74 = load float, ptr %6, align 4, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZL20CreateDefaultPolygonfi(ptr dead_on_unwind writable sret(%struct.PhysicsVertexData) align 4 %14, float noundef %74, i32 noundef %75)
  %76 = load ptr, ptr %9, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct.PhysicsBodyData, ptr %76, i32 0, i32 18
  %78 = getelementptr inbounds %struct.PhysicsShape, ptr %77, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %78, ptr align 4 %14, i64 388, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 388, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.memset.p0.i64(ptr align 4 %15, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store float 0.000000e+00, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store float 0.000000e+00, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %184, %37
  %80 = load i32, ptr %18, align 4, !tbaa !9
  %81 = load ptr, ptr %9, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.PhysicsBodyData, ptr %81, i32 0, i32 18
  %83 = getelementptr inbounds %struct.PhysicsShape, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds %struct.PhysicsVertexData, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !33
  %86 = icmp ult i32 %80, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %187

88:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %89 = load ptr, ptr %9, align 8, !tbaa !11
  %90 = getelementptr inbounds %struct.PhysicsBodyData, ptr %89, i32 0, i32 18
  %91 = getelementptr inbounds %struct.PhysicsShape, ptr %90, i32 0, i32 2
  %92 = getelementptr inbounds %struct.PhysicsVertexData, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %18, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds [24 x %struct.Vector2], ptr %92, i64 0, i64 %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %95, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %96 = load i32, ptr %18, align 4, !tbaa !9
  %97 = add i32 %96, 1
  %98 = load ptr, ptr %9, align 8, !tbaa !11
  %99 = getelementptr inbounds %struct.PhysicsBodyData, ptr %98, i32 0, i32 18
  %100 = getelementptr inbounds %struct.PhysicsShape, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds %struct.PhysicsVertexData, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !33
  %103 = icmp ult i32 %97, %102
  br i1 %103, label %104, label %107

104:                                              ; preds = %88
  %105 = load i32, ptr %18, align 4, !tbaa !9
  %106 = add i32 %105, 1
  br label %108

107:                                              ; preds = %88
  br label %108

108:                                              ; preds = %107, %104
  %109 = phi i32 [ %106, %104 ], [ 0, %107 ]
  store i32 %109, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %110 = load ptr, ptr %9, align 8, !tbaa !11
  %111 = getelementptr inbounds %struct.PhysicsBodyData, ptr %110, i32 0, i32 18
  %112 = getelementptr inbounds %struct.PhysicsShape, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds %struct.PhysicsVertexData, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %20, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds [24 x %struct.Vector2], ptr %113, i64 0, i64 %115
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %116, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !22
  %117 = load <2 x float>, ptr %23, align 4
  %118 = load <2 x float>, ptr %24, align 4
  %119 = call noundef float @_ZL23MathVector2CrossProduct7Vector2S_(<2 x float> %117, <2 x float> %118)
  store float %119, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %120 = load float, ptr %22, align 4, !tbaa !5
  %121 = fdiv float %120, 2.000000e+00
  store float %121, ptr %25, align 4, !tbaa !5
  %122 = load float, ptr %25, align 4, !tbaa !5
  %123 = load float, ptr %16, align 4, !tbaa !5
  %124 = fadd float %123, %122
  store float %124, ptr %16, align 4, !tbaa !5
  %125 = load float, ptr %25, align 4, !tbaa !5
  %126 = fmul float %125, 1.000000e+00
  %127 = fdiv float %126, 3.000000e+00
  %128 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 0
  %129 = load float, ptr %128, align 4, !tbaa !23
  %130 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 0
  %131 = load float, ptr %130, align 4, !tbaa !23
  %132 = fadd float %129, %131
  %133 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  %134 = load float, ptr %133, align 4, !tbaa !23
  %135 = call float @llvm.fmuladd.f32(float %127, float %132, float %134)
  store float %135, ptr %133, align 4, !tbaa !23
  %136 = load float, ptr %25, align 4, !tbaa !5
  %137 = fmul float %136, 1.000000e+00
  %138 = fdiv float %137, 3.000000e+00
  %139 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 1
  %140 = load float, ptr %139, align 4, !tbaa !24
  %141 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !24
  %143 = fadd float %140, %142
  %144 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  %145 = load float, ptr %144, align 4, !tbaa !24
  %146 = call float @llvm.fmuladd.f32(float %138, float %143, float %145)
  store float %146, ptr %144, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %147 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 0
  %148 = load float, ptr %147, align 4, !tbaa !23
  %149 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 0
  %150 = load float, ptr %149, align 4, !tbaa !23
  %151 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 0
  %152 = load float, ptr %151, align 4, !tbaa !23
  %153 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !23
  %155 = fmul float %152, %154
  %156 = call float @llvm.fmuladd.f32(float %148, float %150, float %155)
  %157 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 0
  %158 = load float, ptr %157, align 4, !tbaa !23
  %159 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 0
  %160 = load float, ptr %159, align 4, !tbaa !23
  %161 = call float @llvm.fmuladd.f32(float %158, float %160, float %156)
  store float %161, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %162 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 1
  %163 = load float, ptr %162, align 4, !tbaa !24
  %164 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 1
  %165 = load float, ptr %164, align 4, !tbaa !24
  %166 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 1
  %167 = load float, ptr %166, align 4, !tbaa !24
  %168 = getelementptr inbounds %struct.Vector2, ptr %19, i32 0, i32 1
  %169 = load float, ptr %168, align 4, !tbaa !24
  %170 = fmul float %167, %169
  %171 = call float @llvm.fmuladd.f32(float %163, float %165, float %170)
  %172 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 1
  %173 = load float, ptr %172, align 4, !tbaa !24
  %174 = getelementptr inbounds %struct.Vector2, ptr %21, i32 0, i32 1
  %175 = load float, ptr %174, align 4, !tbaa !24
  %176 = call float @llvm.fmuladd.f32(float %173, float %175, float %171)
  store float %176, ptr %27, align 4, !tbaa !5
  %177 = load float, ptr %22, align 4, !tbaa !5
  %178 = fmul float 0x3FB5555560000000, %177
  %179 = load float, ptr %26, align 4, !tbaa !5
  %180 = load float, ptr %27, align 4, !tbaa !5
  %181 = fadd float %179, %180
  %182 = load float, ptr %17, align 4, !tbaa !5
  %183 = call float @llvm.fmuladd.f32(float %178, float %181, float %182)
  store float %183, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %184

184:                                              ; preds = %108
  %185 = load i32, ptr %18, align 4, !tbaa !9
  %186 = add i32 %185, 1
  store i32 %186, ptr %18, align 4, !tbaa !9
  br label %79, !llvm.loop !34

187:                                              ; preds = %87
  %188 = load float, ptr %16, align 4, !tbaa !5
  %189 = fdiv float 1.000000e+00, %188
  %190 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  %191 = load float, ptr %190, align 4, !tbaa !23
  %192 = fmul float %191, %189
  store float %192, ptr %190, align 4, !tbaa !23
  %193 = load float, ptr %16, align 4, !tbaa !5
  %194 = fdiv float 1.000000e+00, %193
  %195 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  %196 = load float, ptr %195, align 4, !tbaa !24
  %197 = fmul float %196, %194
  store float %197, ptr %195, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %232, %187
  %199 = load i32, ptr %28, align 4, !tbaa !9
  %200 = load ptr, ptr %9, align 8, !tbaa !11
  %201 = getelementptr inbounds %struct.PhysicsBodyData, ptr %200, i32 0, i32 18
  %202 = getelementptr inbounds %struct.PhysicsShape, ptr %201, i32 0, i32 2
  %203 = getelementptr inbounds %struct.PhysicsVertexData, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !33
  %205 = icmp ult i32 %199, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %235

207:                                              ; preds = %198
  %208 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  %209 = load float, ptr %208, align 4, !tbaa !23
  %210 = load ptr, ptr %9, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.PhysicsBodyData, ptr %210, i32 0, i32 18
  %212 = getelementptr inbounds %struct.PhysicsShape, ptr %211, i32 0, i32 2
  %213 = getelementptr inbounds %struct.PhysicsVertexData, ptr %212, i32 0, i32 1
  %214 = load i32, ptr %28, align 4, !tbaa !9
  %215 = zext i32 %214 to i64
  %216 = getelementptr inbounds [24 x %struct.Vector2], ptr %213, i64 0, i64 %215
  %217 = getelementptr inbounds %struct.Vector2, ptr %216, i32 0, i32 0
  %218 = load float, ptr %217, align 4, !tbaa !23
  %219 = fsub float %218, %209
  store float %219, ptr %217, align 4, !tbaa !23
  %220 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  %221 = load float, ptr %220, align 4, !tbaa !24
  %222 = load ptr, ptr %9, align 8, !tbaa !11
  %223 = getelementptr inbounds %struct.PhysicsBodyData, ptr %222, i32 0, i32 18
  %224 = getelementptr inbounds %struct.PhysicsShape, ptr %223, i32 0, i32 2
  %225 = getelementptr inbounds %struct.PhysicsVertexData, ptr %224, i32 0, i32 1
  %226 = load i32, ptr %28, align 4, !tbaa !9
  %227 = zext i32 %226 to i64
  %228 = getelementptr inbounds [24 x %struct.Vector2], ptr %225, i64 0, i64 %227
  %229 = getelementptr inbounds %struct.Vector2, ptr %228, i32 0, i32 1
  %230 = load float, ptr %229, align 4, !tbaa !24
  %231 = fsub float %230, %221
  store float %231, ptr %229, align 4, !tbaa !24
  br label %232

232:                                              ; preds = %207
  %233 = load i32, ptr %28, align 4, !tbaa !9
  %234 = add i32 %233, 1
  store i32 %234, ptr %28, align 4, !tbaa !9
  br label %198, !llvm.loop !36

235:                                              ; preds = %206
  %236 = load float, ptr %8, align 4, !tbaa !5
  %237 = load float, ptr %16, align 4, !tbaa !5
  %238 = fmul float %236, %237
  %239 = load ptr, ptr %9, align 8, !tbaa !11
  %240 = getelementptr inbounds %struct.PhysicsBodyData, ptr %239, i32 0, i32 10
  store float %238, ptr %240, align 4, !tbaa !37
  %241 = load ptr, ptr %9, align 8, !tbaa !11
  %242 = getelementptr inbounds %struct.PhysicsBodyData, ptr %241, i32 0, i32 10
  %243 = load float, ptr %242, align 4, !tbaa !37
  %244 = fcmp une float %243, 0.000000e+00
  br i1 %244, label %245, label %250

245:                                              ; preds = %235
  %246 = load ptr, ptr %9, align 8, !tbaa !11
  %247 = getelementptr inbounds %struct.PhysicsBodyData, ptr %246, i32 0, i32 10
  %248 = load float, ptr %247, align 4, !tbaa !37
  %249 = fdiv float 1.000000e+00, %248
  br label %251

250:                                              ; preds = %235
  br label %251

251:                                              ; preds = %250, %245
  %252 = phi float [ %249, %245 ], [ 0.000000e+00, %250 ]
  %253 = load ptr, ptr %9, align 8, !tbaa !11
  %254 = getelementptr inbounds %struct.PhysicsBodyData, ptr %253, i32 0, i32 11
  store float %252, ptr %254, align 8, !tbaa !38
  %255 = load float, ptr %8, align 4, !tbaa !5
  %256 = load float, ptr %17, align 4, !tbaa !5
  %257 = fmul float %255, %256
  %258 = load ptr, ptr %9, align 8, !tbaa !11
  %259 = getelementptr inbounds %struct.PhysicsBodyData, ptr %258, i32 0, i32 8
  store float %257, ptr %259, align 4, !tbaa !39
  %260 = load ptr, ptr %9, align 8, !tbaa !11
  %261 = getelementptr inbounds %struct.PhysicsBodyData, ptr %260, i32 0, i32 8
  %262 = load float, ptr %261, align 4, !tbaa !39
  %263 = fcmp une float %262, 0.000000e+00
  br i1 %263, label %264, label %269

264:                                              ; preds = %251
  %265 = load ptr, ptr %9, align 8, !tbaa !11
  %266 = getelementptr inbounds %struct.PhysicsBodyData, ptr %265, i32 0, i32 8
  %267 = load float, ptr %266, align 4, !tbaa !39
  %268 = fdiv float 1.000000e+00, %267
  br label %270

269:                                              ; preds = %251
  br label %270

270:                                              ; preds = %269, %264
  %271 = phi float [ %268, %264 ], [ 0.000000e+00, %269 ]
  %272 = load ptr, ptr %9, align 8, !tbaa !11
  %273 = getelementptr inbounds %struct.PhysicsBodyData, ptr %272, i32 0, i32 9
  store float %271, ptr %273, align 8, !tbaa !40
  %274 = load ptr, ptr %9, align 8, !tbaa !11
  %275 = getelementptr inbounds %struct.PhysicsBodyData, ptr %274, i32 0, i32 12
  store float 0x3FD99999A0000000, ptr %275, align 4, !tbaa !41
  %276 = load ptr, ptr %9, align 8, !tbaa !11
  %277 = getelementptr inbounds %struct.PhysicsBodyData, ptr %276, i32 0, i32 13
  store float 0x3FC99999A0000000, ptr %277, align 8, !tbaa !42
  %278 = load ptr, ptr %9, align 8, !tbaa !11
  %279 = getelementptr inbounds %struct.PhysicsBodyData, ptr %278, i32 0, i32 14
  store float 0.000000e+00, ptr %279, align 4, !tbaa !43
  %280 = load ptr, ptr %9, align 8, !tbaa !11
  %281 = getelementptr inbounds %struct.PhysicsBodyData, ptr %280, i32 0, i32 15
  store i8 1, ptr %281, align 8, !tbaa !44
  %282 = load ptr, ptr %9, align 8, !tbaa !11
  %283 = getelementptr inbounds %struct.PhysicsBodyData, ptr %282, i32 0, i32 16
  store i8 0, ptr %283, align 1, !tbaa !45
  %284 = load ptr, ptr %9, align 8, !tbaa !11
  %285 = getelementptr inbounds %struct.PhysicsBodyData, ptr %284, i32 0, i32 17
  store i8 0, ptr %285, align 2, !tbaa !46
  %286 = load ptr, ptr %9, align 8, !tbaa !11
  %287 = load i32, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !9
  %288 = zext i32 %287 to i64
  %289 = getelementptr inbounds [64 x ptr], ptr @_ZL6bodies, i64 0, i64 %288
  store ptr %286, ptr %289, align 8, !tbaa !11
  %290 = load i32, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !9
  %291 = add i32 %290, 1
  store i32 %291, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !9
  %292 = load ptr, ptr %9, align 8, !tbaa !11
  %293 = getelementptr inbounds %struct.PhysicsBodyData, ptr %292, i32 0, i32 0
  %294 = load i32, ptr %293, align 8, !tbaa !13
  %295 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %294)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %298

296:                                              ; preds = %4
  %297 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %298

298:                                              ; preds = %296, %270
  %299 = load ptr, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  ret ptr %299
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22FindAvailableBodyIndexv() #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef) #4

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

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #8

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20CreateDefaultPolygonfi(ptr dead_on_unwind noalias writable sret(%struct.PhysicsVertexData) align 4, float noundef, i32 noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { inlinehint mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind allocsize(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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS15PhysicsBodyData", !10, i64 0, !15, i64 4, !16, i64 8, !16, i64 16, !16, i64 24, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !15, i64 72, !15, i64 73, !15, i64 74, !17, i64 80}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTS7Vector2", !6, i64 0, !6, i64 4}
!17 = !{!"_ZTS12PhysicsShape", !18, i64 0, !12, i64 8, !19, i64 16, !6, i64 404, !20, i64 408}
!18 = !{!"_ZTS16PhysicsShapeType", !7, i64 0}
!19 = !{!"_ZTS17PhysicsVertexData", !10, i64 0, !7, i64 4, !7, i64 196}
!20 = !{!"_ZTS9Matrix2x2", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!21 = !{!14, !15, i64 4}
!22 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!23 = !{!16, !6, i64 0}
!24 = !{!16, !6, i64 4}
!25 = !{!14, !6, i64 32}
!26 = !{!14, !6, i64 36}
!27 = !{!14, !6, i64 40}
!28 = !{!14, !18, i64 80}
!29 = !{!14, !12, i64 88}
!30 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!31 = !{i64 0, i64 4, !9, i64 4, i64 192, !32, i64 196, i64 192, !32}
!32 = !{!7, !7, i64 0}
!33 = !{!14, !10, i64 96}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!14, !6, i64 52}
!38 = !{!14, !6, i64 56}
!39 = !{!14, !6, i64 44}
!40 = !{!14, !6, i64 48}
!41 = !{!14, !6, i64 60}
!42 = !{!14, !6, i64 64}
!43 = !{!14, !6, i64 68}
!44 = !{!14, !15, i64 72}
!45 = !{!14, !15, i64 73}
!46 = !{!14, !15, i64 74}


; 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.PhysicsVertexData = type { i32, [24 x %struct.Vector2], [24 x %struct.Vector2] }
%struct.Vector2 = type { float, float }

@_ZL10usedMemory = external hidden local_unnamed_addr global i32, align 4
@_ZL6bodies = external hidden local_unnamed_addr global [64 x ptr], align 16
@_ZL18physicsBodiesCount = external hidden local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [71 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; 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 uwtable
define dso_local noundef ptr @CreatePhysicsBodyPolygon(<2 x float> %0, float noundef %1, i32 noundef %2, float noundef %3) local_unnamed_addr #2 {
  %5 = alloca %struct.PhysicsVertexData, align 4
  %6 = tail call noalias dereferenceable_or_null(504) ptr @malloc(i64 noundef 504) #10
  %7 = load i32, ptr @_ZL10usedMemory, align 4, !tbaa !5
  %8 = add i32 %7, 504
  store i32 %8, ptr @_ZL10usedMemory, align 4, !tbaa !5
  %9 = tail call noundef i32 @_ZL22FindAvailableBodyIndexv()
  %.not = icmp eq i32 %9, -1
  br i1 %.not, label %84, label %10

10:                                               ; preds = %4
  store i32 %9, ptr %6, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %6, i64 4
  store i8 1, ptr %11, align 4, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  store <2 x float> %0, ptr %12, align 8
  %13 = getelementptr inbounds i8, ptr %6, i64 16
  %14 = getelementptr inbounds i8, ptr %6, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %13, i8 0, i64 28, i1 false)
  store i32 1, ptr %14, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %6, i64 88
  store ptr %6, ptr %15, align 8, !tbaa !21
  %16 = tail call { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef 0.000000e+00)
  %17 = extractvalue { <2 x float>, <2 x float> } %16, 0
  %18 = extractvalue { <2 x float>, <2 x float> } %16, 1
  %19 = getelementptr inbounds i8, ptr %6, i64 488
  store <2 x float> %17, ptr %19, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 496
  store <2 x float> %18, ptr %.sroa.4.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 388, ptr nonnull %5) #11
  call void @_ZL20CreateDefaultPolygonfi(ptr dead_on_unwind nonnull writable sret(%struct.PhysicsVertexData) align 4 %5, float noundef %1, i32 noundef %2)
  %20 = getelementptr inbounds i8, ptr %6, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(388) %20, ptr noundef nonnull align 4 dereferenceable(388) %5, i64 388, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 388, ptr nonnull %5) #11
  %21 = load i32, ptr %20, align 8, !tbaa !24
  %.not125 = icmp eq i32 %21, 0
  br i1 %.not125, label %._crit_edge124, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %22 = getelementptr inbounds i8, ptr %6, i64 100
  br label %32

._crit_edge:                                      ; preds = %32
  %23 = fdiv float 1.000000e+00, %42
  %24 = insertelement <2 x float> poison, float %23, i64 0
  %25 = shufflevector <2 x float> %24, <2 x float> poison, <2 x i32> zeroinitializer
  %26 = fmul <2 x float> %25, %47
  %.not126 = icmp eq i32 %55, 0
  br i1 %.not126, label %._crit_edge124, label %.lr.ph123

.lr.ph123:                                        ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %6, i64 100
  %wide.trip.count = zext i32 %55 to i64
  %min.iters.check = icmp eq i32 %55, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph123
  %indvars.iv133.ph = phi i64 [ 0, %.lr.ph123 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph123
  %n.vec = and i64 %wide.trip.count, 4294967294
  %broadcast.splat = shufflevector <2 x float> %26, <2 x float> poison, <2 x i32> zeroinitializer
  %broadcast.splat154 = shufflevector <2 x float> %26, <2 x float> poison, <2 x i32> <i32 1, i32 1>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %28 = getelementptr inbounds [24 x %struct.Vector2], ptr %27, i64 0, i64 %index
  %wide.vec = load <4 x float>, ptr %28, align 4, !tbaa !25
  %strided.vec = shufflevector <4 x float> %wide.vec, <4 x float> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec152 = shufflevector <4 x float> %wide.vec, <4 x float> poison, <2 x i32> <i32 1, i32 3>
  %29 = fsub <2 x float> %strided.vec, %broadcast.splat
  %30 = fsub <2 x float> %strided.vec152, %broadcast.splat154
  %interleaved.vec = shufflevector <2 x float> %29, <2 x float> %30, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x float> %interleaved.vec, ptr %28, align 4, !tbaa !25
  %index.next = add nuw i64 %index, 2
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge124, label %scalar.ph.preheader

32:                                               ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %33 = phi i32 [ %21, %.lr.ph ], [ %55, %32 ]
  %.0105114 = phi float [ 0.000000e+00, %.lr.ph ], [ %42, %32 ]
  %.0106113 = phi float [ 0.000000e+00, %.lr.ph ], [ %54, %32 ]
  %34 = phi <2 x float> [ zeroinitializer, %.lr.ph ], [ %47, %32 ]
  %35 = getelementptr inbounds [24 x %struct.Vector2], ptr %22, i64 0, i64 %indvars.iv
  %.sroa.026.0.copyload = load <2 x float>, ptr %35, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = zext i32 %33 to i64
  %37 = icmp ult i64 %indvars.iv.next, %36
  %38 = select i1 %37, i64 %indvars.iv.next, i64 0
  %39 = getelementptr inbounds [24 x %struct.Vector2], ptr %22, i64 0, i64 %38
  %.sroa.011.0.copyload = load <2 x float>, ptr %39, align 4
  %40 = call noundef float @_ZL23MathVector2CrossProduct7Vector2S_(<2 x float> %.sroa.026.0.copyload, <2 x float> %.sroa.011.0.copyload)
  %41 = fmul float %40, 5.000000e-01
  %42 = fadd float %.0105114, %41
  %43 = fdiv float %41, 3.000000e+00
  %44 = fadd <2 x float> %.sroa.026.0.copyload, %.sroa.011.0.copyload
  %45 = insertelement <2 x float> poison, float %43, i64 0
  %46 = shufflevector <2 x float> %45, <2 x float> poison, <2 x i32> zeroinitializer
  %47 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %46, <2 x float> %44, <2 x float> %34)
  %48 = fmul <2 x float> %.sroa.026.0.copyload, %.sroa.011.0.copyload
  %49 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %.sroa.026.0.copyload, <2 x float> %.sroa.026.0.copyload, <2 x float> %48)
  %50 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %.sroa.011.0.copyload, <2 x float> %.sroa.011.0.copyload, <2 x float> %49)
  %51 = fmul float %40, 0x3FB5555560000000
  %shift = shufflevector <2 x float> %50, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %52 = fadd <2 x float> %50, %shift
  %53 = extractelement <2 x float> %52, i64 0
  %54 = call float @llvm.fmuladd.f32(float %51, float %53, float %.0106113)
  %55 = load i32, ptr %20, align 8, !tbaa !24
  %56 = zext i32 %55 to i64
  %57 = icmp ult i64 %indvars.iv.next, %56
  br i1 %57, label %32, label %._crit_edge, !llvm.loop !30

._crit_edge124:                                   ; preds = %scalar.ph, %middle.block, %10, %._crit_edge
  %.0105.lcssa143 = phi float [ %42, %._crit_edge ], [ 0.000000e+00, %10 ], [ %42, %middle.block ], [ %42, %scalar.ph ]
  %.0106.lcssa142 = phi float [ %54, %._crit_edge ], [ 0.000000e+00, %10 ], [ %54, %middle.block ], [ %54, %scalar.ph ]
  %58 = fmul float %.0105.lcssa143, %3
  %59 = getelementptr inbounds i8, ptr %6, i64 52
  store float %58, ptr %59, align 4, !tbaa !31
  %60 = fcmp une float %58, 0.000000e+00
  %61 = fdiv float 1.000000e+00, %58
  %62 = select i1 %60, float %61, float 0.000000e+00
  %63 = getelementptr inbounds i8, ptr %6, i64 56
  store float %62, ptr %63, align 8, !tbaa !32
  %64 = fmul float %.0106.lcssa142, %3
  %65 = getelementptr inbounds i8, ptr %6, i64 44
  store float %64, ptr %65, align 4, !tbaa !33
  %66 = fcmp une float %64, 0.000000e+00
  %67 = fdiv float 1.000000e+00, %64
  %68 = select i1 %66, float %67, float 0.000000e+00
  %69 = getelementptr inbounds i8, ptr %6, i64 48
  store float %68, ptr %69, align 8, !tbaa !34
  %70 = getelementptr inbounds i8, ptr %6, i64 60
  store <2 x float> <float 0x3FD99999A0000000, float 0x3FC99999A0000000>, ptr %70, align 4, !tbaa !25
  %71 = getelementptr inbounds i8, ptr %6, i64 68
  store float 0.000000e+00, ptr %71, align 4, !tbaa !35
  %72 = getelementptr inbounds i8, ptr %6, i64 72
  store i8 1, ptr %72, align 8, !tbaa !36
  %73 = getelementptr inbounds i8, ptr %6, i64 73
  store i8 0, ptr %73, align 1, !tbaa !37
  %74 = getelementptr inbounds i8, ptr %6, i64 74
  store i8 0, ptr %74, align 2, !tbaa !38
  %75 = load i32, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !5
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds [64 x ptr], ptr @_ZL6bodies, i64 0, i64 %76
  store ptr %6, ptr %77, align 8, !tbaa !39
  %78 = add i32 %75, 1
  store i32 %78, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 8, !tbaa !9
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %79)
  br label %86

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %scalar.ph ], [ %indvars.iv133.ph, %scalar.ph.preheader ]
  %81 = getelementptr inbounds [24 x %struct.Vector2], ptr %27, i64 0, i64 %indvars.iv133
  %82 = load <2 x float>, ptr %81, align 4, !tbaa !25
  %83 = fsub <2 x float> %82, %26
  store <2 x float> %83, ptr %81, align 4, !tbaa !25
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next134, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge124, label %scalar.ph, !llvm.loop !40

84:                                               ; preds = %4
  %85 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %86

86:                                               ; preds = %84, %._crit_edge124
  ret ptr %6
}

; Function Attrs: mustprogress 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) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL22FindAvailableBodyIndexv() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20CreateDefaultPolygonfi(ptr dead_on_unwind noalias writable sret(%struct.PhysicsVertexData) align 4, float noundef, i32 noundef) local_unnamed_addr #2

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

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

attributes #0 = { nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS15PhysicsBodyData", !6, i64 0, !11, i64 4, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !11, i64 72, !11, i64 73, !11, i64 74, !14, i64 80}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTS7Vector2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS12PhysicsShape", !15, i64 0, !16, i64 8, !17, i64 16, !13, i64 404, !18, i64 408}
!15 = !{!"_ZTS16PhysicsShapeType", !7, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTS17PhysicsVertexData", !6, i64 0, !7, i64 4, !7, i64 196}
!18 = !{!"_ZTS9Matrix2x2", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!19 = !{!10, !11, i64 4}
!20 = !{!10, !15, i64 80}
!21 = !{!10, !16, i64 88}
!22 = !{i64 0, i64 4, !5, i64 4, i64 192, !23, i64 196, i64 192, !23}
!23 = !{!7, !7, i64 0}
!24 = !{!10, !6, i64 96}
!25 = !{!13, !13, i64 0}
!26 = distinct !{!26, !27, !28, !29}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"llvm.loop.isvectorized", i32 1}
!29 = !{!"llvm.loop.unroll.runtime.disable"}
!30 = distinct !{!30, !27}
!31 = !{!10, !13, i64 52}
!32 = !{!10, !13, i64 56}
!33 = !{!10, !13, i64 44}
!34 = !{!10, !13, i64 48}
!35 = !{!10, !13, i64 68}
!36 = !{!10, !11, i64 72}
!37 = !{!10, !11, i64 73}
!38 = !{!10, !11, i64 74}
!39 = !{!16, !16, i64 0}
!40 = distinct !{!40, !27, !29, !28}


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