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

; 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.b2Rot = type { float, float }
%struct.b2Vec2 = type { float, float }
%struct.b2Softness = type { float, float, float }
%struct.b2JointSim = type { i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %union.anon }
%union.anon = type { %struct.b2PrismaticJoint }
%struct.b2PrismaticJoint = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, %struct.b2Softness, i8, i8, i8 }
%struct.b2StepContext = type { float, float, float, float, i32, %struct.b2Softness, %struct.b2Softness, %struct.b2Softness, float, float, ptr, ptr, ptr, ptr, ptr, i32, ptr, %struct.b2AtomicInt, ptr, ptr, ptr, i32, i32, ptr, i32, i8, [64 x i8], %struct.b2AtomicU32, [64 x i8] }
%struct.b2AtomicInt = type { i32 }
%struct.b2AtomicU32 = type { i32 }
%struct.b2World = type { %struct.b2ArenaAllocator, %struct.b2BroadPhase, %struct.b2ConstraintGraph, %struct.b2IdPool, %struct.b2BodyArray, %struct.b2IdPool, %struct.b2SolverSetArray, %struct.b2IdPool, %struct.b2JointArray, %struct.b2IdPool, %struct.b2ContactArray, %struct.b2IdPool, %struct.b2IslandArray, %struct.b2IdPool, %struct.b2IdPool, %struct.b2ShapeArray, %struct.b2ChainShapeArray, %struct.b2SensorArray, %struct.b2TaskContextArray, %struct.b2SensorTaskContextArray, %struct.b2BodyMoveEventArray, %struct.b2SensorBeginTouchEventArray, %struct.b2ContactBeginTouchEventArray, [2 x %struct.b2SensorEndTouchEventArray], [2 x %struct.b2ContactEndTouchEventArray], i32, %struct.b2ContactHitEventArray, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, i64, i32, %struct.b2Vec2, float, float, float, float, float, float, float, float, ptr, ptr, i16, %struct.b2Profile, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, float, i32, i32, i16, i8, i8, i8, i8, i8, i8 }
%struct.b2ArenaAllocator = type { ptr, i32, i32, i32, i32, %struct.b2ArenaEntryArray }
%struct.b2ArenaEntryArray = type { ptr, i32, i32 }
%struct.b2BroadPhase = type { [3 x %struct.b2DynamicTree], i32, %struct.b2HashSet, %struct.b2IntArray, ptr, ptr, i32, %struct.b2AtomicInt, %struct.b2HashSet }
%struct.b2DynamicTree = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32 }
%struct.b2IntArray = type { ptr, i32, i32 }
%struct.b2HashSet = type { ptr, i32, i32 }
%struct.b2ConstraintGraph = type { [12 x %struct.b2GraphColor] }
%struct.b2GraphColor = type { %struct.b2BitSet, %struct.b2ContactSimArray, %struct.b2JointSimArray, %union.anon.0 }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon.0 = type { ptr }
%struct.b2BodyArray = type { ptr, i32, i32 }
%struct.b2SolverSetArray = type { ptr, i32, i32 }
%struct.b2JointArray = type { ptr, i32, i32 }
%struct.b2ContactArray = type { ptr, i32, i32 }
%struct.b2IslandArray = type { ptr, i32, i32 }
%struct.b2IdPool = type { %struct.b2IntArray, i32 }
%struct.b2ShapeArray = type { ptr, i32, i32 }
%struct.b2ChainShapeArray = type { ptr, i32, i32 }
%struct.b2SensorArray = type { ptr, i32, i32 }
%struct.b2TaskContextArray = type { ptr, i32, i32 }
%struct.b2SensorTaskContextArray = type { ptr, i32, i32 }
%struct.b2BodyMoveEventArray = type { ptr, i32, i32 }
%struct.b2SensorBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2SensorEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactHitEventArray = type { ptr, i32, i32 }
%struct.b2BitSet = type { ptr, i32, i32 }
%struct.b2Profile = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%struct.b2Body = type { [32 x i8], ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, i32, i32, i32, i16, i8, i8, i8, i8 }
%struct.b2SolverSet = type { %struct.b2BodySimArray, %struct.b2BodyStateArray, %struct.b2JointSimArray, %struct.b2ContactSimArray, %struct.b2IslandSimArray, i32 }
%struct.b2BodySimArray = type { ptr, i32, i32 }
%struct.b2BodyStateArray = type { ptr, i32, i32 }
%struct.b2IslandSimArray = type { ptr, i32, i32 }
%struct.b2BodySim = type { %struct.b2Transform, %struct.b2Vec2, %struct.b2Rot, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, i32, i8, i8, i8, i8, i8 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2WheelJoint = type { %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, %struct.b2Softness, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1

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

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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #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) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareWheelJoint(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %struct.b2Rot, align 4
  %22 = alloca %struct.b2Rot, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca %struct.b2Vec2, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca %struct.b2Vec2, align 4
  %27 = alloca %struct.b2Vec2, align 4
  %28 = alloca %struct.b2Vec2, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca %struct.b2Vec2, align 4
  %31 = alloca %struct.b2Vec2, align 4
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca %struct.b2Vec2, align 4
  %35 = alloca float, align 4
  %36 = alloca %struct.b2Vec2, align 4
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca %struct.b2Vec2, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca %struct.b2Softness, align 4
  %44 = alloca { <2 x float>, float }, align 8
  %45 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %2
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.b2JointSim, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 7
  br i1 %50, label %55, label %51

51:                                               ; preds = %46
  %52 = call i32 @b2InternalAssertFcn(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 185)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @llvm.trap()
  br label %55

55:                                               ; preds = %54, %51, %46
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.b2JointSim, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !14
  store i32 %59, ptr %5, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.b2JointSim, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !16
  store i32 %62, ptr %6, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.b2StepContext, ptr %63, i32 0, i32 10
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  store ptr %65, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.b2World, ptr %66, i32 0, i32 4
  %68 = load i32, ptr %5, align 4, !tbaa !15
  %69 = call ptr @b2BodyArray_Get(ptr noundef %67, i32 noundef %68)
  store ptr %69, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.b2World, ptr %70, i32 0, i32 4
  %72 = load i32, ptr %6, align 4, !tbaa !15
  %73 = call ptr @b2BodyArray_Get(ptr noundef %71, i32 noundef %72)
  store ptr %73, ptr %9, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %56
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.b2Body, ptr %75, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !23
  %78 = icmp eq i32 %77, 2
  br i1 %78, label %88, label %79

79:                                               ; preds = %74
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.b2Body, ptr %80, i32 0, i32 2
  %82 = load i32, ptr %81, align 8, !tbaa !23
  %83 = icmp eq i32 %82, 2
  br i1 %83, label %88, label %84

84:                                               ; preds = %79
  %85 = call i32 @b2InternalAssertFcn(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 196)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %84
  call void @llvm.trap()
  br label %88

88:                                               ; preds = %87, %84, %79, %74
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2World, ptr %91, i32 0, i32 6
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.b2Body, ptr %93, i32 0, i32 2
  %95 = load i32, ptr %94, align 8, !tbaa !23
  %96 = call ptr @b2SolverSetArray_Get(ptr noundef %92, i32 noundef %95)
  store ptr %96, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.b2World, ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.b2Body, ptr %99, i32 0, i32 2
  %101 = load i32, ptr %100, align 8, !tbaa !23
  %102 = call ptr @b2SolverSetArray_Get(ptr noundef %98, i32 noundef %101)
  store ptr %102, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.b2Body, ptr %103, i32 0, i32 3
  %105 = load i32, ptr %104, align 4, !tbaa !26
  store i32 %105, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.b2Body, ptr %106, i32 0, i32 3
  %108 = load i32, ptr %107, align 4, !tbaa !26
  store i32 %108, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.b2SolverSet, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %12, align 4, !tbaa !15
  %112 = call ptr @b2BodySimArray_Get(ptr noundef %110, i32 noundef %111)
  store ptr %112, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.b2SolverSet, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %13, align 4, !tbaa !15
  %116 = call ptr @b2BodySimArray_Get(ptr noundef %114, i32 noundef %115)
  store ptr %116, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.b2BodySim, ptr %117, i32 0, i32 7
  %119 = load float, ptr %118, align 4, !tbaa !27
  store float %119, ptr %16, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.b2BodySim, ptr %120, i32 0, i32 8
  %122 = load float, ptr %121, align 4, !tbaa !32
  store float %122, ptr %17, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.b2BodySim, ptr %123, i32 0, i32 7
  %125 = load float, ptr %124, align 4, !tbaa !27
  store float %125, ptr %18, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.b2BodySim, ptr %126, i32 0, i32 8
  %128 = load float, ptr %127, align 4, !tbaa !32
  store float %128, ptr %19, align 4, !tbaa !31
  %129 = load float, ptr %16, align 4, !tbaa !31
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.b2JointSim, ptr %130, i32 0, i32 6
  store float %129, ptr %131, align 4, !tbaa !33
  %132 = load float, ptr %18, align 4, !tbaa !31
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.b2JointSim, ptr %133, i32 0, i32 7
  store float %132, ptr %134, align 4, !tbaa !34
  %135 = load float, ptr %17, align 4, !tbaa !31
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.b2JointSim, ptr %136, i32 0, i32 8
  store float %135, ptr %137, align 4, !tbaa !35
  %138 = load float, ptr %19, align 4, !tbaa !31
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.b2JointSim, ptr %139, i32 0, i32 9
  store float %138, ptr %140, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.b2JointSim, ptr %141, i32 0, i32 10
  store ptr %142, ptr %20, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.b2Body, ptr %143, i32 0, i32 2
  %145 = load i32, ptr %144, align 8, !tbaa !23
  %146 = icmp eq i32 %145, 2
  br i1 %146, label %147, label %149

147:                                              ; preds = %90
  %148 = load i32, ptr %12, align 4, !tbaa !15
  br label %150

149:                                              ; preds = %90
  br label %150

150:                                              ; preds = %149, %147
  %151 = phi i32 [ %148, %147 ], [ -1, %149 ]
  %152 = load ptr, ptr %20, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.b2WheelJoint, ptr %152, i32 0, i32 12
  store i32 %151, ptr %153, align 4, !tbaa !37
  %154 = load ptr, ptr %9, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.b2Body, ptr %154, i32 0, i32 2
  %156 = load i32, ptr %155, align 8, !tbaa !23
  %157 = icmp eq i32 %156, 2
  br i1 %157, label %158, label %160

158:                                              ; preds = %150
  %159 = load i32, ptr %13, align 4, !tbaa !15
  br label %161

160:                                              ; preds = %150
  br label %161

161:                                              ; preds = %160, %158
  %162 = phi i32 [ %159, %158 ], [ -1, %160 ]
  %163 = load ptr, ptr %20, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.b2WheelJoint, ptr %163, i32 0, i32 13
  store i32 %162, ptr %164, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.b2BodySim, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.b2Transform, ptr %166, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %167, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %168 = load ptr, ptr %15, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.b2BodySim, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds %struct.b2Transform, ptr %169, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %170, i64 8, i1 false), !tbaa.struct !40
  %171 = load ptr, ptr %20, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.b2WheelJoint, ptr %171, i32 0, i32 14
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.b2JointSim, ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.b2BodySim, ptr %175, i32 0, i32 4
  %177 = load <2 x float>, ptr %174, align 4
  %178 = load <2 x float>, ptr %176, align 4
  %179 = call <2 x float> @b2Sub(<2 x float> %177, <2 x float> %178)
  store <2 x float> %179, ptr %24, align 4
  %180 = load <2 x float>, ptr %21, align 4
  %181 = load <2 x float>, ptr %24, align 4
  %182 = call <2 x float> @b2RotateVector(<2 x float> %180, <2 x float> %181)
  store <2 x float> %182, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %172, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  %183 = load ptr, ptr %20, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.b2WheelJoint, ptr %183, i32 0, i32 15
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.b2JointSim, ptr %185, i32 0, i32 5
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.b2BodySim, ptr %187, i32 0, i32 4
  %189 = load <2 x float>, ptr %186, align 4
  %190 = load <2 x float>, ptr %188, align 4
  %191 = call <2 x float> @b2Sub(<2 x float> %189, <2 x float> %190)
  store <2 x float> %191, ptr %26, align 4
  %192 = load <2 x float>, ptr %22, align 4
  %193 = load <2 x float>, ptr %26, align 4
  %194 = call <2 x float> @b2RotateVector(<2 x float> %192, <2 x float> %193)
  store <2 x float> %194, ptr %25, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %184, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  %195 = load ptr, ptr %20, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.b2WheelJoint, ptr %195, i32 0, i32 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %197 = load ptr, ptr %20, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.b2WheelJoint, ptr %197, i32 0, i32 0
  %199 = load <2 x float>, ptr %21, align 4
  %200 = load <2 x float>, ptr %198, align 4
  %201 = call <2 x float> @b2RotateVector(<2 x float> %199, <2 x float> %200)
  store <2 x float> %201, ptr %27, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %196, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %202 = load ptr, ptr %20, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.b2WheelJoint, ptr %202, i32 0, i32 17
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %204 = load ptr, ptr %15, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.b2BodySim, ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.b2BodySim, ptr %206, i32 0, i32 1
  %208 = load <2 x float>, ptr %205, align 4
  %209 = load <2 x float>, ptr %207, align 4
  %210 = call <2 x float> @b2Sub(<2 x float> %208, <2 x float> %209)
  store <2 x float> %210, ptr %28, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %203, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %211 = load ptr, ptr %20, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.b2WheelJoint, ptr %211, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %212, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %213 = load ptr, ptr %20, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.b2WheelJoint, ptr %213, i32 0, i32 15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %214, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %215 = load ptr, ptr %20, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.b2WheelJoint, ptr %215, i32 0, i32 17
  %217 = load <2 x float>, ptr %30, align 4
  %218 = load <2 x float>, ptr %29, align 4
  %219 = call <2 x float> @b2Sub(<2 x float> %217, <2 x float> %218)
  store <2 x float> %219, ptr %32, align 4
  %220 = load <2 x float>, ptr %216, align 4
  %221 = load <2 x float>, ptr %32, align 4
  %222 = call <2 x float> @b2Add(<2 x float> %220, <2 x float> %221)
  store <2 x float> %222, ptr %31, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.b2WheelJoint, ptr %223, i32 0, i32 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %224, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %225 = load <2 x float>, ptr %33, align 4
  %226 = call <2 x float> @b2LeftPerp(<2 x float> %225)
  store <2 x float> %226, ptr %34, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %227 = load <2 x float>, ptr %31, align 4
  %228 = load <2 x float>, ptr %29, align 4
  %229 = call <2 x float> @b2Add(<2 x float> %227, <2 x float> %228)
  store <2 x float> %229, ptr %36, align 4
  %230 = load <2 x float>, ptr %36, align 4
  %231 = load <2 x float>, ptr %34, align 4
  %232 = call float @b2Cross(<2 x float> %230, <2 x float> %231)
  store float %232, ptr %35, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %233 = load <2 x float>, ptr %30, align 4
  %234 = load <2 x float>, ptr %34, align 4
  %235 = call float @b2Cross(<2 x float> %233, <2 x float> %234)
  store float %235, ptr %37, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %236 = load float, ptr %16, align 4, !tbaa !31
  %237 = load float, ptr %18, align 4, !tbaa !31
  %238 = fadd float %236, %237
  %239 = load float, ptr %17, align 4, !tbaa !31
  %240 = load float, ptr %35, align 4, !tbaa !31
  %241 = fmul float %239, %240
  %242 = load float, ptr %35, align 4, !tbaa !31
  %243 = call float @llvm.fmuladd.f32(float %241, float %242, float %238)
  %244 = load float, ptr %19, align 4, !tbaa !31
  %245 = load float, ptr %37, align 4, !tbaa !31
  %246 = fmul float %244, %245
  %247 = load float, ptr %37, align 4, !tbaa !31
  %248 = call float @llvm.fmuladd.f32(float %246, float %247, float %243)
  store float %248, ptr %38, align 4, !tbaa !31
  %249 = load float, ptr %38, align 4, !tbaa !31
  %250 = fcmp ogt float %249, 0.000000e+00
  br i1 %250, label %251, label %254

251:                                              ; preds = %161
  %252 = load float, ptr %38, align 4, !tbaa !31
  %253 = fdiv float 1.000000e+00, %252
  br label %255

254:                                              ; preds = %161
  br label %255

255:                                              ; preds = %254, %251
  %256 = phi float [ %253, %251 ], [ 0.000000e+00, %254 ]
  %257 = load ptr, ptr %20, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.b2WheelJoint, ptr %257, i32 0, i32 18
  store float %256, ptr %258, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %259 = load <2 x float>, ptr %31, align 4
  %260 = load <2 x float>, ptr %29, align 4
  %261 = call <2 x float> @b2Add(<2 x float> %259, <2 x float> %260)
  store <2 x float> %261, ptr %40, align 4
  %262 = load <2 x float>, ptr %40, align 4
  %263 = load <2 x float>, ptr %33, align 4
  %264 = call float @b2Cross(<2 x float> %262, <2 x float> %263)
  store float %264, ptr %39, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %265 = load <2 x float>, ptr %30, align 4
  %266 = load <2 x float>, ptr %33, align 4
  %267 = call float @b2Cross(<2 x float> %265, <2 x float> %266)
  store float %267, ptr %41, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %268 = load float, ptr %16, align 4, !tbaa !31
  %269 = load float, ptr %18, align 4, !tbaa !31
  %270 = fadd float %268, %269
  %271 = load float, ptr %17, align 4, !tbaa !31
  %272 = load float, ptr %39, align 4, !tbaa !31
  %273 = fmul float %271, %272
  %274 = load float, ptr %39, align 4, !tbaa !31
  %275 = call float @llvm.fmuladd.f32(float %273, float %274, float %270)
  %276 = load float, ptr %19, align 4, !tbaa !31
  %277 = load float, ptr %41, align 4, !tbaa !31
  %278 = fmul float %276, %277
  %279 = load float, ptr %41, align 4, !tbaa !31
  %280 = call float @llvm.fmuladd.f32(float %278, float %279, float %275)
  store float %280, ptr %42, align 4, !tbaa !31
  %281 = load float, ptr %42, align 4, !tbaa !31
  %282 = fcmp ogt float %281, 0.000000e+00
  br i1 %282, label %283, label %286

283:                                              ; preds = %255
  %284 = load float, ptr %42, align 4, !tbaa !31
  %285 = fdiv float 1.000000e+00, %284
  br label %287

286:                                              ; preds = %255
  br label %287

287:                                              ; preds = %286, %283
  %288 = phi float [ %285, %283 ], [ 0.000000e+00, %286 ]
  %289 = load ptr, ptr %20, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.b2WheelJoint, ptr %289, i32 0, i32 20
  store float %288, ptr %290, align 4, !tbaa !42
  %291 = load ptr, ptr %20, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.b2WheelJoint, ptr %291, i32 0, i32 21
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #8
  %293 = load ptr, ptr %20, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.b2WheelJoint, ptr %293, i32 0, i32 10
  %295 = load float, ptr %294, align 4, !tbaa !43
  %296 = load ptr, ptr %20, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.b2WheelJoint, ptr %296, i32 0, i32 11
  %298 = load float, ptr %297, align 4, !tbaa !44
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.b2StepContext, ptr %299, i32 0, i32 2
  %301 = load float, ptr %300, align 8, !tbaa !45
  %302 = call { <2 x float>, float } @b2MakeSoft(float noundef %295, float noundef %298, float noundef %301)
  store { <2 x float>, float } %302, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 8 %44, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %292, ptr align 4 %43, i64 12, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %303 = load float, ptr %17, align 4, !tbaa !31
  %304 = load float, ptr %19, align 4, !tbaa !31
  %305 = fadd float %303, %304
  store float %305, ptr %45, align 4, !tbaa !31
  %306 = load float, ptr %45, align 4, !tbaa !31
  %307 = fcmp ogt float %306, 0.000000e+00
  br i1 %307, label %308, label %311

308:                                              ; preds = %287
  %309 = load float, ptr %45, align 4, !tbaa !31
  %310 = fdiv float 1.000000e+00, %309
  br label %312

311:                                              ; preds = %287
  br label %312

312:                                              ; preds = %311, %308
  %313 = phi float [ %310, %308 ], [ 0.000000e+00, %311 ]
  %314 = load ptr, ptr %20, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.b2WheelJoint, ptr %314, i32 0, i32 19
  store float %313, ptr %315, align 4, !tbaa !47
  %316 = load ptr, ptr %4, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.b2StepContext, ptr %316, i32 0, i32 25
  %318 = load i8, ptr %317, align 4, !tbaa !48, !range !49, !noundef !50
  %319 = trunc i8 %318 to i1
  %320 = zext i1 %319 to i32
  %321 = icmp eq i32 %320, 0
  br i1 %321, label %322, label %333

322:                                              ; preds = %312
  %323 = load ptr, ptr %20, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.b2WheelJoint, ptr %323, i32 0, i32 1
  store float 0.000000e+00, ptr %324, align 4, !tbaa !51
  %325 = load ptr, ptr %20, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.b2WheelJoint, ptr %325, i32 0, i32 3
  store float 0.000000e+00, ptr %326, align 4, !tbaa !52
  %327 = load ptr, ptr %20, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.b2WheelJoint, ptr %327, i32 0, i32 2
  store float 0.000000e+00, ptr %328, align 4, !tbaa !53
  %329 = load ptr, ptr %20, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.b2WheelJoint, ptr %329, i32 0, i32 4
  store float 0.000000e+00, ptr %330, align 4, !tbaa !54
  %331 = load ptr, ptr %20, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.b2WheelJoint, ptr %331, i32 0, i32 5
  store float 0.000000e+00, ptr %332, align 4, !tbaa !55
  br label %333

333:                                              ; preds = %322, %312
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodyArray_Get(ptr noundef, i32 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2SolverSetArray_Get(ptr noundef, i32 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodySimArray_Get(ptr noundef, i32 noundef) #6

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 12}
!10 = !{!"b2JointSim", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !7, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 8}
!17 = !{!18, !6, i64 64}
!18 = !{!"b2StepContext", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !11, i64 16, !19, i64 20, !19, i64 32, !19, i64 44, !13, i64 56, !13, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !20, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !11, i64 152, !11, i64 156, !6, i64 160, !11, i64 168, !21, i64 172, !7, i64 173, !22, i64 240, !7, i64 244}
!19 = !{!"b2Softness", !13, i64 0, !13, i64 4, !13, i64 8}
!20 = !{!"b2AtomicInt", !11, i64 0}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!"b2AtomicU32", !11, i64 0}
!23 = !{!24, !11, i64 40}
!24 = !{!"b2Body", !7, i64 0, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !25, i64 116, !21, i64 118, !21, i64 119, !21, i64 120, !21, i64 121}
!25 = !{!"short", !7, i64 0}
!26 = !{!24, !11, i64 44}
!27 = !{!28, !13, i64 60}
!28 = !{!"b2BodySim", !29, i64 0, !12, i64 16, !30, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !11, i64 88, !21, i64 92, !21, i64 93, !21, i64 94, !21, i64 95, !21, i64 96}
!29 = !{!"b2Transform", !12, i64 0, !30, i64 8}
!30 = !{!"b2Rot", !13, i64 0, !13, i64 4}
!31 = !{!13, !13, i64 0}
!32 = !{!28, !13, i64 64}
!33 = !{!10, !13, i64 32}
!34 = !{!10, !13, i64 36}
!35 = !{!10, !13, i64 40}
!36 = !{!10, !13, i64 44}
!37 = !{!38, !11, i64 52}
!38 = !{!"b2WheelJoint", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !11, i64 52, !11, i64 56, !12, i64 60, !12, i64 68, !12, i64 76, !12, i64 84, !13, i64 92, !13, i64 96, !13, i64 100, !19, i64 104, !21, i64 116, !21, i64 117, !21, i64 118}
!39 = !{!38, !11, i64 56}
!40 = !{i64 0, i64 4, !31, i64 4, i64 4, !31}
!41 = !{!38, !13, i64 92}
!42 = !{!38, !13, i64 100}
!43 = !{!38, !13, i64 44}
!44 = !{!38, !13, i64 48}
!45 = !{!18, !13, i64 8}
!46 = !{i64 0, i64 4, !31, i64 4, i64 4, !31, i64 8, i64 4, !31}
!47 = !{!38, !13, i64 96}
!48 = !{!18, !21, i64 172}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!38, !13, i64 8}
!52 = !{!38, !13, i64 16}
!53 = !{!38, !13, i64 12}
!54 = !{!38, !13, i64 20}
!55 = !{!38, !13, i64 24}


; 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"

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [65 x i8], align 1

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareWheelJoint(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 7
  br i1 %5, label %9, label %6

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

8:                                                ; preds = %6
  tail call void @llvm.trap()
  unreachable

9:                                                ; preds = %2, %6
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i32, ptr %12, align 4, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %1, i64 64
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %15, i64 1032
  %17 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %16, i32 noundef %11)
  %18 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %16, i32 noundef %13)
  %19 = getelementptr inbounds i8, ptr %17, i64 40
  %20 = load i32, ptr %19, align 8, !tbaa !21
  %21 = icmp eq i32 %20, 2
  br i1 %21, label %29, label %22

22:                                               ; preds = %9
  %23 = getelementptr inbounds i8, ptr %18, i64 40
  %24 = load i32, ptr %23, align 8, !tbaa !21
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %29, label %26

26:                                               ; preds = %22
  %27 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 196) #7
  %.not118 = icmp eq i32 %27, 0
  br i1 %.not118, label %._crit_edge, label %28

._crit_edge:                                      ; preds = %26
  %.pre = load i32, ptr %19, align 8, !tbaa !21
  br label %29

28:                                               ; preds = %26
  tail call void @llvm.trap()
  unreachable

29:                                               ; preds = %._crit_edge, %22, %9
  %30 = phi i32 [ %.pre, %._crit_edge ], [ %20, %22 ], [ 2, %9 ]
  %31 = getelementptr inbounds i8, ptr %15, i64 1072
  %32 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %31, i32 noundef %30)
  %33 = getelementptr inbounds i8, ptr %18, i64 40
  %34 = load i32, ptr %33, align 8, !tbaa !21
  %35 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %31, i32 noundef %34)
  %36 = getelementptr inbounds i8, ptr %17, i64 44
  %37 = load i32, ptr %36, align 4, !tbaa !24
  %38 = getelementptr inbounds i8, ptr %18, i64 44
  %39 = load i32, ptr %38, align 4, !tbaa !24
  %40 = tail call ptr @b2BodySimArray_Get(ptr noundef %32, i32 noundef %37)
  %41 = tail call ptr @b2BodySimArray_Get(ptr noundef %35, i32 noundef %39)
  %42 = getelementptr inbounds i8, ptr %40, i64 60
  %43 = load <2 x float>, ptr %42, align 4, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %41, i64 60
  %45 = load <2 x float>, ptr %44, align 4, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %0, i64 32
  %47 = shufflevector <2 x float> %43, <2 x float> %45, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x float> %47, ptr %46, align 4, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %0, i64 48
  %49 = load i32, ptr %19, align 8, !tbaa !21
  %50 = icmp eq i32 %49, 2
  %51 = select i1 %50, i32 %37, i32 -1
  %52 = getelementptr inbounds i8, ptr %0, i64 100
  store i32 %51, ptr %52, align 4, !tbaa !26
  %53 = load i32, ptr %33, align 8, !tbaa !21
  %54 = icmp eq i32 %53, 2
  %55 = select i1 %54, i32 %39, i32 -1
  %56 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %55, ptr %56, align 4, !tbaa !28
  %57 = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.038.0.copyload = load <2 x float>, ptr %57, align 4
  %58 = getelementptr inbounds i8, ptr %41, i64 8
  %.sroa.037.0.copyload = load <2 x float>, ptr %58, align 4
  %59 = getelementptr inbounds i8, ptr %0, i64 108
  %60 = getelementptr inbounds i8, ptr %0, i64 16
  %61 = getelementptr inbounds i8, ptr %40, i64 40
  %62 = load <2 x float>, ptr %60, align 4
  %63 = load <2 x float>, ptr %61, align 4
  %64 = tail call <2 x float> @b2Sub(<2 x float> %62, <2 x float> %63)
  %65 = tail call <2 x float> @b2RotateVector(<2 x float> %.sroa.038.0.copyload, <2 x float> %64)
  store <2 x float> %65, ptr %59, align 4
  %66 = getelementptr inbounds i8, ptr %0, i64 116
  %67 = getelementptr inbounds i8, ptr %0, i64 24
  %68 = getelementptr inbounds i8, ptr %41, i64 40
  %69 = load <2 x float>, ptr %67, align 4
  %70 = load <2 x float>, ptr %68, align 4
  %71 = tail call <2 x float> @b2Sub(<2 x float> %69, <2 x float> %70)
  %72 = tail call <2 x float> @b2RotateVector(<2 x float> %.sroa.037.0.copyload, <2 x float> %71)
  store <2 x float> %72, ptr %66, align 4
  %73 = getelementptr inbounds i8, ptr %0, i64 124
  %74 = load <2 x float>, ptr %48, align 4
  %75 = tail call <2 x float> @b2RotateVector(<2 x float> %.sroa.038.0.copyload, <2 x float> %74)
  store <2 x float> %75, ptr %73, align 4
  %76 = getelementptr inbounds i8, ptr %0, i64 132
  %77 = getelementptr inbounds i8, ptr %41, i64 16
  %78 = getelementptr inbounds i8, ptr %40, i64 16
  %79 = load <2 x float>, ptr %77, align 4
  %80 = load <2 x float>, ptr %78, align 4
  %81 = tail call <2 x float> @b2Sub(<2 x float> %79, <2 x float> %80)
  store <2 x float> %81, ptr %76, align 4
  %.sroa.028.0.copyload = load <2 x float>, ptr %59, align 4
  %.sroa.025.0.copyload = load <2 x float>, ptr %66, align 4
  %82 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.025.0.copyload, <2 x float> %.sroa.028.0.copyload)
  %83 = load <2 x float>, ptr %76, align 4
  %84 = tail call <2 x float> @b2Add(<2 x float> %83, <2 x float> %82)
  %.sroa.019.0.copyload = load <2 x float>, ptr %73, align 4
  %85 = tail call <2 x float> @b2LeftPerp(<2 x float> %.sroa.019.0.copyload)
  %86 = tail call <2 x float> @b2Add(<2 x float> %84, <2 x float> %.sroa.028.0.copyload)
  %87 = tail call float @b2Cross(<2 x float> %86, <2 x float> %85)
  %88 = tail call float @b2Cross(<2 x float> %.sroa.025.0.copyload, <2 x float> %85)
  %89 = fadd <2 x float> %43, %45
  %90 = extractelement <2 x float> %89, i64 0
  %91 = extractelement <2 x float> %43, i64 1
  %92 = fmul float %91, %87
  %93 = tail call float @llvm.fmuladd.f32(float %92, float %87, float %90)
  %94 = extractelement <2 x float> %45, i64 1
  %95 = fmul float %94, %88
  %96 = tail call float @llvm.fmuladd.f32(float %95, float %88, float %93)
  %97 = fcmp ogt float %96, 0.000000e+00
  %98 = fdiv float 1.000000e+00, %96
  %99 = select i1 %97, float %98, float 0.000000e+00
  %100 = getelementptr inbounds i8, ptr %0, i64 140
  store float %99, ptr %100, align 4, !tbaa !29
  %101 = tail call <2 x float> @b2Add(<2 x float> %84, <2 x float> %.sroa.028.0.copyload)
  %102 = tail call float @b2Cross(<2 x float> %101, <2 x float> %.sroa.019.0.copyload)
  %103 = tail call float @b2Cross(<2 x float> %.sroa.025.0.copyload, <2 x float> %.sroa.019.0.copyload)
  %104 = fmul float %91, %102
  %105 = tail call float @llvm.fmuladd.f32(float %104, float %102, float %90)
  %106 = fmul float %94, %103
  %107 = tail call float @llvm.fmuladd.f32(float %106, float %103, float %105)
  %108 = fcmp ogt float %107, 0.000000e+00
  %109 = fdiv float 1.000000e+00, %107
  %110 = select i1 %108, float %109, float 0.000000e+00
  %111 = getelementptr inbounds i8, ptr %0, i64 148
  store float %110, ptr %111, align 4, !tbaa !30
  %112 = getelementptr inbounds i8, ptr %0, i64 152
  %113 = getelementptr inbounds i8, ptr %0, i64 92
  %114 = load float, ptr %113, align 4, !tbaa !31
  %115 = getelementptr inbounds i8, ptr %0, i64 96
  %116 = load float, ptr %115, align 4, !tbaa !32
  %117 = getelementptr inbounds i8, ptr %1, i64 8
  %118 = load float, ptr %117, align 8, !tbaa !33
  %119 = tail call { <2 x float>, float } @b2MakeSoft(float noundef %114, float noundef %116, float noundef %118)
  %.fca.0.extract = extractvalue { <2 x float>, float } %119, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %119, 1
  store <2 x float> %.fca.0.extract, ptr %112, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 160
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !25
  %120 = fadd float %91, %94
  %121 = fcmp ogt float %120, 0.000000e+00
  %122 = fdiv float 1.000000e+00, %120
  %123 = select i1 %121, float %122, float 0.000000e+00
  %124 = getelementptr inbounds i8, ptr %0, i64 144
  store float %123, ptr %124, align 4, !tbaa !34
  %125 = getelementptr inbounds i8, ptr %1, i64 172
  %126 = load i8, ptr %125, align 4, !tbaa !35, !range !36, !noundef !37
  %127 = icmp eq i8 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %29
  %129 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %129, i8 0, i64 20, i1 false)
  br label %130

130:                                              ; preds = %128, %29
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodyArray_Get(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2SolverSetArray_Get(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodySimArray_Get(ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

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

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

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

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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, !7, i64 12}
!6 = !{!"b2JointSim", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !8, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"b2Vec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !17, i64 64}
!15 = !{!"b2StepContext", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !7, i64 16, !16, i64 20, !16, i64 32, !16, i64 44, !11, i64 56, !11, i64 60, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !7, i64 104, !17, i64 112, !18, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !7, i64 152, !7, i64 156, !17, i64 160, !7, i64 168, !19, i64 172, !8, i64 173, !20, i64 240, !8, i64 244}
!16 = !{!"b2Softness", !11, i64 0, !11, i64 4, !11, i64 8}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"b2AtomicInt", !7, i64 0}
!19 = !{!"_Bool", !8, i64 0}
!20 = !{!"b2AtomicU32", !7, i64 0}
!21 = !{!22, !7, i64 40}
!22 = !{!"b2Body", !8, i64 0, !17, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !23, i64 116, !19, i64 118, !19, i64 119, !19, i64 120, !19, i64 121}
!23 = !{!"short", !8, i64 0}
!24 = !{!22, !7, i64 44}
!25 = !{!11, !11, i64 0}
!26 = !{!27, !7, i64 52}
!27 = !{!"b2WheelJoint", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 52, !7, i64 56, !10, i64 60, !10, i64 68, !10, i64 76, !10, i64 84, !11, i64 92, !11, i64 96, !11, i64 100, !16, i64 104, !19, i64 116, !19, i64 117, !19, i64 118}
!28 = !{!27, !7, i64 56}
!29 = !{!27, !11, i64 92}
!30 = !{!27, !11, i64 100}
!31 = !{!27, !11, i64 44}
!32 = !{!27, !11, i64 48}
!33 = !{!15, !11, i64 8}
!34 = !{!27, !11, i64 96}
!35 = !{!15, !19, i64 172}
!36 = !{i8 0, i8 2}
!37 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass