; 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.2 = external hidden unnamed_addr constant [70 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: 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) #2

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @CreatePhysicsBodyRectangle(<2 x float> %0, float noundef %1, float noundef %2, float noundef %3) #3 {
  %5 = alloca %struct.Vector2, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.Matrix2x2, align 4
  %12 = alloca %struct.PhysicsVertexData, align 4
  %13 = alloca %struct.Vector2, align 4
  %14 = alloca %struct.Vector2, 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 float %2, ptr %7, align 4, !tbaa !5
  store float %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %29 = call noalias ptr @calloc(i64 noundef 504, i64 noundef 1) #10
  store ptr %29, ptr %9, align 8, !tbaa !9
  %30 = load i32, ptr @_ZL10usedMemory, align 4, !tbaa !11
  %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 !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %34 = call noundef i32 @_ZL22FindAvailableBodyIndexv()
  store i32 %34, ptr %10, align 4, !tbaa !11
  %35 = load i32, ptr %10, align 4, !tbaa !11
  %36 = icmp ne i32 %35, -1
  br i1 %36, label %37, label %286

37:                                               ; preds = %4
  %38 = load i32, ptr %10, align 4, !tbaa !11
  %39 = load ptr, ptr %9, align 8, !tbaa !9
  %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 !9
  %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 !9
  %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
  %45 = load ptr, ptr %9, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.PhysicsBodyData, ptr %45, i32 0, i32 18
  %47 = getelementptr inbounds %struct.PhysicsShape, ptr %46, i32 0, i32 0
  store i32 1, ptr %47, align 8, !tbaa !23
  %48 = load ptr, ptr %9, align 8, !tbaa !9
  %49 = load ptr, ptr %9, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.PhysicsBodyData, ptr %49, i32 0, i32 18
  %51 = getelementptr inbounds %struct.PhysicsShape, ptr %50, i32 0, i32 1
  store ptr %48, ptr %51, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #9
  %52 = call { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef 0.000000e+00)
  %53 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 0
  %54 = extractvalue { <2 x float>, <2 x float> } %52, 0
  store <2 x float> %54, ptr %53, align 4
  %55 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 1
  %56 = extractvalue { <2 x float>, <2 x float> } %52, 1
  store <2 x float> %56, ptr %55, align 4
  %57 = load ptr, ptr %9, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.PhysicsBodyData, ptr %57, i32 0, i32 18
  %59 = getelementptr inbounds %struct.PhysicsShape, ptr %58, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 388, ptr %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !22
  %60 = getelementptr inbounds %struct.Vector2, ptr %14, i32 0, i32 0
  %61 = load float, ptr %6, align 4, !tbaa !5
  store float %61, ptr %60, align 4, !tbaa !26
  %62 = getelementptr inbounds %struct.Vector2, ptr %14, i32 0, i32 1
  %63 = load float, ptr %7, align 4, !tbaa !5
  store float %63, ptr %62, align 4, !tbaa !27
  %64 = load <2 x float>, ptr %13, align 4
  %65 = load <2 x float>, ptr %14, align 4
  call void @_ZL22CreateRectanglePolygon7Vector2S_(ptr dead_on_unwind writable sret(%struct.PhysicsVertexData) align 4 %12, <2 x float> %64, <2 x float> %65)
  %66 = load ptr, ptr %9, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.PhysicsBodyData, ptr %66, i32 0, i32 18
  %68 = getelementptr inbounds %struct.PhysicsShape, ptr %67, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %68, ptr align 4 %12, i64 388, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 388, ptr %12) #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 !11
  br label %69

69:                                               ; preds = %174, %37
  %70 = load i32, ptr %18, align 4, !tbaa !11
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.PhysicsBodyData, ptr %71, i32 0, i32 18
  %73 = getelementptr inbounds %struct.PhysicsShape, ptr %72, i32 0, i32 2
  %74 = getelementptr inbounds %struct.PhysicsVertexData, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !30
  %76 = icmp ult i32 %70, %75
  br i1 %76, label %78, label %77

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

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %79 = load ptr, ptr %9, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.PhysicsBodyData, ptr %79, i32 0, i32 18
  %81 = getelementptr inbounds %struct.PhysicsShape, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds %struct.PhysicsVertexData, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %18, align 4, !tbaa !11
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds [24 x %struct.Vector2], ptr %82, i64 0, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %85, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %86 = load i32, ptr %18, align 4, !tbaa !11
  %87 = add i32 %86, 1
  %88 = load ptr, ptr %9, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.PhysicsBodyData, ptr %88, i32 0, i32 18
  %90 = getelementptr inbounds %struct.PhysicsShape, ptr %89, i32 0, i32 2
  %91 = getelementptr inbounds %struct.PhysicsVertexData, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 8, !tbaa !30
  %93 = icmp ult i32 %87, %92
  br i1 %93, label %94, label %97

94:                                               ; preds = %78
  %95 = load i32, ptr %18, align 4, !tbaa !11
  %96 = add i32 %95, 1
  br label %98

97:                                               ; preds = %78
  br label %98

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

174:                                              ; preds = %98
  %175 = load i32, ptr %18, align 4, !tbaa !11
  %176 = add i32 %175, 1
  store i32 %176, ptr %18, align 4, !tbaa !11
  br label %69, !llvm.loop !31

177:                                              ; preds = %77
  %178 = load float, ptr %16, align 4, !tbaa !5
  %179 = fdiv float 1.000000e+00, %178
  %180 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  %181 = load float, ptr %180, align 4, !tbaa !26
  %182 = fmul float %181, %179
  store float %182, ptr %180, align 4, !tbaa !26
  %183 = load float, ptr %16, align 4, !tbaa !5
  %184 = fdiv float 1.000000e+00, %183
  %185 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  %186 = load float, ptr %185, align 4, !tbaa !27
  %187 = fmul float %186, %184
  store float %187, ptr %185, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !11
  br label %188

188:                                              ; preds = %222, %177
  %189 = load i32, ptr %28, align 4, !tbaa !11
  %190 = load ptr, ptr %9, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.PhysicsBodyData, ptr %190, i32 0, i32 18
  %192 = getelementptr inbounds %struct.PhysicsShape, ptr %191, i32 0, i32 2
  %193 = getelementptr inbounds %struct.PhysicsVertexData, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 8, !tbaa !30
  %195 = icmp ult i32 %189, %194
  br i1 %195, label %197, label %196

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

197:                                              ; preds = %188
  %198 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 0
  %199 = load float, ptr %198, align 4, !tbaa !26
  %200 = load ptr, ptr %9, align 8, !tbaa !9
  %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 1
  %204 = load i32, ptr %28, align 4, !tbaa !11
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds [24 x %struct.Vector2], ptr %203, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.Vector2, ptr %206, i32 0, i32 0
  %208 = load float, ptr %207, align 4, !tbaa !26
  %209 = fsub float %208, %199
  store float %209, ptr %207, align 4, !tbaa !26
  %210 = getelementptr inbounds %struct.Vector2, ptr %15, i32 0, i32 1
  %211 = load float, ptr %210, align 4, !tbaa !27
  %212 = load ptr, ptr %9, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.PhysicsBodyData, ptr %212, i32 0, i32 18
  %214 = getelementptr inbounds %struct.PhysicsShape, ptr %213, i32 0, i32 2
  %215 = getelementptr inbounds %struct.PhysicsVertexData, ptr %214, i32 0, i32 1
  %216 = load i32, ptr %28, align 4, !tbaa !11
  %217 = zext i32 %216 to i64
  %218 = getelementptr inbounds [24 x %struct.Vector2], ptr %215, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.Vector2, ptr %218, i32 0, i32 1
  %220 = load float, ptr %219, align 4, !tbaa !27
  %221 = fsub float %220, %211
  store float %221, ptr %219, align 4, !tbaa !27
  br label %222

222:                                              ; preds = %197
  %223 = load i32, ptr %28, align 4, !tbaa !11
  %224 = add i32 %223, 1
  store i32 %224, ptr %28, align 4, !tbaa !11
  br label %188, !llvm.loop !33

225:                                              ; preds = %196
  %226 = load float, ptr %8, align 4, !tbaa !5
  %227 = load float, ptr %16, align 4, !tbaa !5
  %228 = fmul float %226, %227
  %229 = load ptr, ptr %9, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.PhysicsBodyData, ptr %229, i32 0, i32 10
  store float %228, ptr %230, align 4, !tbaa !34
  %231 = load ptr, ptr %9, align 8, !tbaa !9
  %232 = getelementptr inbounds %struct.PhysicsBodyData, ptr %231, i32 0, i32 10
  %233 = load float, ptr %232, align 4, !tbaa !34
  %234 = fcmp une float %233, 0.000000e+00
  br i1 %234, label %235, label %240

235:                                              ; preds = %225
  %236 = load ptr, ptr %9, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.PhysicsBodyData, ptr %236, i32 0, i32 10
  %238 = load float, ptr %237, align 4, !tbaa !34
  %239 = fdiv float 1.000000e+00, %238
  br label %241

240:                                              ; preds = %225
  br label %241

241:                                              ; preds = %240, %235
  %242 = phi float [ %239, %235 ], [ 0.000000e+00, %240 ]
  %243 = load ptr, ptr %9, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.PhysicsBodyData, ptr %243, i32 0, i32 11
  store float %242, ptr %244, align 8, !tbaa !35
  %245 = load float, ptr %8, align 4, !tbaa !5
  %246 = load float, ptr %17, align 4, !tbaa !5
  %247 = fmul float %245, %246
  %248 = load ptr, ptr %9, align 8, !tbaa !9
  %249 = getelementptr inbounds %struct.PhysicsBodyData, ptr %248, i32 0, i32 8
  store float %247, ptr %249, align 4, !tbaa !36
  %250 = load ptr, ptr %9, align 8, !tbaa !9
  %251 = getelementptr inbounds %struct.PhysicsBodyData, ptr %250, i32 0, i32 8
  %252 = load float, ptr %251, align 4, !tbaa !36
  %253 = fcmp une float %252, 0.000000e+00
  br i1 %253, label %254, label %259

254:                                              ; preds = %241
  %255 = load ptr, ptr %9, align 8, !tbaa !9
  %256 = getelementptr inbounds %struct.PhysicsBodyData, ptr %255, i32 0, i32 8
  %257 = load float, ptr %256, align 4, !tbaa !36
  %258 = fdiv float 1.000000e+00, %257
  br label %260

259:                                              ; preds = %241
  br label %260

260:                                              ; preds = %259, %254
  %261 = phi float [ %258, %254 ], [ 0.000000e+00, %259 ]
  %262 = load ptr, ptr %9, align 8, !tbaa !9
  %263 = getelementptr inbounds %struct.PhysicsBodyData, ptr %262, i32 0, i32 9
  store float %261, ptr %263, align 8, !tbaa !37
  %264 = load ptr, ptr %9, align 8, !tbaa !9
  %265 = getelementptr inbounds %struct.PhysicsBodyData, ptr %264, i32 0, i32 12
  store float 0x3FD99999A0000000, ptr %265, align 4, !tbaa !38
  %266 = load ptr, ptr %9, align 8, !tbaa !9
  %267 = getelementptr inbounds %struct.PhysicsBodyData, ptr %266, i32 0, i32 13
  store float 0x3FC99999A0000000, ptr %267, align 8, !tbaa !39
  %268 = load ptr, ptr %9, align 8, !tbaa !9
  %269 = getelementptr inbounds %struct.PhysicsBodyData, ptr %268, i32 0, i32 14
  store float 0.000000e+00, ptr %269, align 4, !tbaa !40
  %270 = load ptr, ptr %9, align 8, !tbaa !9
  %271 = getelementptr inbounds %struct.PhysicsBodyData, ptr %270, i32 0, i32 15
  store i8 1, ptr %271, align 8, !tbaa !41
  %272 = load ptr, ptr %9, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.PhysicsBodyData, ptr %272, i32 0, i32 16
  store i8 0, ptr %273, align 1, !tbaa !42
  %274 = load ptr, ptr %9, align 8, !tbaa !9
  %275 = getelementptr inbounds %struct.PhysicsBodyData, ptr %274, i32 0, i32 17
  store i8 0, ptr %275, align 2, !tbaa !43
  %276 = load ptr, ptr %9, align 8, !tbaa !9
  %277 = load i32, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !11
  %278 = zext i32 %277 to i64
  %279 = getelementptr inbounds [64 x ptr], ptr @_ZL6bodies, i64 0, i64 %278
  store ptr %276, ptr %279, align 8, !tbaa !9
  %280 = load i32, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !11
  %281 = add i32 %280, 1
  store i32 %281, ptr @_ZL18physicsBodiesCount, align 4, !tbaa !11
  %282 = load ptr, ptr %9, align 8, !tbaa !9
  %283 = getelementptr inbounds %struct.PhysicsBodyData, ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 8, !tbaa !13
  %285 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %284)
  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 %288

286:                                              ; preds = %4
  %287 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %288

288:                                              ; preds = %286, %260
  %289 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  ret ptr %289
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22CreateRectanglePolygon7Vector2S_(ptr dead_on_unwind noalias writable sret(%struct.PhysicsVertexData) align 4, <2 x float>, <2 x float>) #3

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }

!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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS15PhysicsBodyData", !12, 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, !10, i64 8, !19, i64 16, !6, i64 404, !20, i64 408}
!18 = !{!"_ZTS16PhysicsShapeType", !7, i64 0}
!19 = !{!"_ZTS17PhysicsVertexData", !12, 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 = !{!14, !18, i64 80}
!24 = !{!14, !10, i64 88}
!25 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!26 = !{!16, !6, i64 0}
!27 = !{!16, !6, i64 4}
!28 = !{i64 0, i64 4, !11, i64 4, i64 192, !29, i64 196, i64 192, !29}
!29 = !{!7, !7, i64 0}
!30 = !{!14, !12, i64 96}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!14, !6, i64 52}
!35 = !{!14, !6, i64 56}
!36 = !{!14, !6, i64 44}
!37 = !{!14, !6, i64 48}
!38 = !{!14, !6, i64 60}
!39 = !{!14, !6, i64 64}
!40 = !{!14, !6, i64 68}
!41 = !{!14, !15, i64 72}
!42 = !{!14, !15, i64 73}
!43 = !{!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.2 = external hidden unnamed_addr constant [70 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 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) #2

; 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 uwtable
define dso_local noundef ptr @CreatePhysicsBodyRectangle(<2 x float> %0, float noundef %1, float noundef %2, float noundef %3) local_unnamed_addr #3 {
  %5 = alloca %struct.PhysicsVertexData, align 4
  %6 = tail call noalias dereferenceable_or_null(504) ptr @calloc(i64 noundef 504, i64 noundef 1) #9
  %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 %83, 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 80
  store i32 1, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %6, i64 88
  store ptr %6, ptr %14, align 8, !tbaa !21
  %15 = tail call { <2 x float>, <2 x float> } @_ZL18MathMatFromRadiansf(float noundef 0.000000e+00)
  %16 = extractvalue { <2 x float>, <2 x float> } %15, 0
  %17 = extractvalue { <2 x float>, <2 x float> } %15, 1
  %18 = getelementptr inbounds i8, ptr %6, i64 488
  store <2 x float> %16, ptr %18, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 496
  store <2 x float> %17, ptr %.sroa.4.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 388, ptr nonnull %5) #10
  %.sroa.056.0.vec.insert = insertelement <2 x float> poison, float %1, i64 0
  %.sroa.056.4.vec.insert = insertelement <2 x float> %.sroa.056.0.vec.insert, float %2, i64 1
  call void @_ZL22CreateRectanglePolygon7Vector2S_(ptr dead_on_unwind nonnull writable sret(%struct.PhysicsVertexData) align 4 %5, <2 x float> %0, <2 x float> %.sroa.056.4.vec.insert)
  %19 = getelementptr inbounds i8, ptr %6, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(388) %19, 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) #10
  %20 = load i32, ptr %19, align 8, !tbaa !24
  %.not119 = icmp eq i32 %20, 0
  br i1 %.not119, label %._crit_edge118, label %.lr.ph

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

._crit_edge:                                      ; preds = %31
  %22 = fdiv float 1.000000e+00, %41
  %23 = insertelement <2 x float> poison, float %22, i64 0
  %24 = shufflevector <2 x float> %23, <2 x float> poison, <2 x i32> zeroinitializer
  %25 = fmul <2 x float> %24, %46
  %.not120 = icmp eq i32 %54, 0
  br i1 %.not120, label %._crit_edge118, label %.lr.ph117

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

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

vector.ph:                                        ; preds = %.lr.ph117
  %n.vec = and i64 %wide.trip.count, 4294967294
  %broadcast.splat = shufflevector <2 x float> %25, <2 x float> poison, <2 x i32> zeroinitializer
  %broadcast.splat148 = shufflevector <2 x float> %25, <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 ]
  %27 = getelementptr inbounds [24 x %struct.Vector2], ptr %26, i64 0, i64 %index
  %wide.vec = load <4 x float>, ptr %27, align 4, !tbaa !25
  %strided.vec = shufflevector <4 x float> %wide.vec, <4 x float> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec146 = shufflevector <4 x float> %wide.vec, <4 x float> poison, <2 x i32> <i32 1, i32 3>
  %28 = fsub <2 x float> %strided.vec, %broadcast.splat
  %29 = fsub <2 x float> %strided.vec146, %broadcast.splat148
  %interleaved.vec = shufflevector <2 x float> %28, <2 x float> %29, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x float> %interleaved.vec, ptr %27, align 4, !tbaa !25
  %index.next = add nuw i64 %index, 2
  %30 = icmp eq i64 %index.next, %n.vec
  br i1 %30, 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_edge118, label %scalar.ph.preheader

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

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

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

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

85:                                               ; preds = %83, %._crit_edge118
  ret ptr %6
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22CreateRectanglePolygon7Vector2S_(ptr dead_on_unwind noalias writable sret(%struct.PhysicsVertexData) align 4, <2 x float>, <2 x float>) local_unnamed_addr #3

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

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

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

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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { 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,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass