; LLVM IR from erincatto/box2d :: src (distance_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.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.b2Rot = type { float, float }
%struct.b2DistanceJoint = type { float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Softness, float, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 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: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareDistanceJoint(ptr noundef %0, ptr noundef %1) #4 {
  %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.b2Vec2, align 4
  %22 = alloca %struct.b2Vec2, 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 float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca %struct.b2Softness, align 4
  %35 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %2
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.b2JointSim, ptr %37, i32 0, i32 3
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %45, label %41

41:                                               ; preds = %36
  %42 = call i32 @b2InternalAssertFcn(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 217)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  call void @llvm.trap()
  br label %45

45:                                               ; preds = %44, %41, %36
  br label %46

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.b2JointSim, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !14
  store i32 %49, ptr %5, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.b2JointSim, ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !16
  store i32 %52, ptr %6, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.b2StepContext, ptr %53, i32 0, i32 10
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  store ptr %55, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.b2World, ptr %56, i32 0, i32 4
  %58 = load i32, ptr %5, align 4, !tbaa !15
  %59 = call ptr @b2BodyArray_Get(ptr noundef %57, i32 noundef %58)
  store ptr %59, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.b2World, ptr %60, i32 0, i32 4
  %62 = load i32, ptr %6, align 4, !tbaa !15
  %63 = call ptr @b2BodyArray_Get(ptr noundef %61, i32 noundef %62)
  store ptr %63, ptr %9, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %46
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.b2Body, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !23
  %68 = icmp eq i32 %67, 2
  br i1 %68, label %78, label %69

69:                                               ; preds = %64
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.b2Body, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 8, !tbaa !23
  %73 = icmp eq i32 %72, 2
  br i1 %73, label %78, label %74

74:                                               ; preds = %69
  %75 = call i32 @b2InternalAssertFcn(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 227)
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  call void @llvm.trap()
  br label %78

78:                                               ; preds = %77, %74, %69, %64
  br label %79

79:                                               ; preds = %78
  br label %80

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

137:                                              ; preds = %80
  %138 = load i32, ptr %12, align 4, !tbaa !15
  br label %140

139:                                              ; preds = %80
  br label %140

140:                                              ; preds = %139, %137
  %141 = phi i32 [ %138, %137 ], [ -1, %139 ]
  %142 = load ptr, ptr %20, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.b2DistanceJoint, ptr %142, i32 0, i32 11
  store i32 %141, ptr %143, align 4, !tbaa !37
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.b2Body, ptr %144, i32 0, i32 2
  %146 = load i32, ptr %145, align 8, !tbaa !23
  %147 = icmp eq i32 %146, 2
  br i1 %147, label %148, label %150

148:                                              ; preds = %140
  %149 = load i32, ptr %13, align 4, !tbaa !15
  br label %151

150:                                              ; preds = %140
  br label %151

151:                                              ; preds = %150, %148
  %152 = phi i32 [ %149, %148 ], [ -1, %150 ]
  %153 = load ptr, ptr %20, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.b2DistanceJoint, ptr %153, i32 0, i32 12
  store i32 %152, ptr %154, align 4, !tbaa !39
  %155 = load ptr, ptr %20, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.b2DistanceJoint, ptr %155, i32 0, i32 13
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %157 = load ptr, ptr %14, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.b2BodySim, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds %struct.b2Transform, ptr %158, i32 0, i32 1
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.b2JointSim, ptr %160, i32 0, i32 4
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.b2BodySim, ptr %162, i32 0, i32 4
  %164 = load <2 x float>, ptr %161, align 4
  %165 = load <2 x float>, ptr %163, align 4
  %166 = call <2 x float> @b2Sub(<2 x float> %164, <2 x float> %165)
  store <2 x float> %166, ptr %22, align 4
  %167 = load <2 x float>, ptr %159, align 4
  %168 = load <2 x float>, ptr %22, align 4
  %169 = call <2 x float> @b2RotateVector(<2 x float> %167, <2 x float> %168)
  store <2 x float> %169, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %156, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  %170 = load ptr, ptr %20, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.b2DistanceJoint, ptr %170, i32 0, i32 14
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %172 = load ptr, ptr %15, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.b2BodySim, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds %struct.b2Transform, ptr %173, i32 0, i32 1
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.b2JointSim, ptr %175, i32 0, i32 5
  %177 = load ptr, ptr %15, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.b2BodySim, ptr %177, i32 0, i32 4
  %179 = load <2 x float>, ptr %176, align 4
  %180 = load <2 x float>, ptr %178, align 4
  %181 = call <2 x float> @b2Sub(<2 x float> %179, <2 x float> %180)
  store <2 x float> %181, ptr %24, align 4
  %182 = load <2 x float>, ptr %174, align 4
  %183 = load <2 x float>, ptr %24, align 4
  %184 = call <2 x float> @b2RotateVector(<2 x float> %182, <2 x float> %183)
  store <2 x float> %184, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %171, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  %185 = load ptr, ptr %20, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.b2DistanceJoint, ptr %185, i32 0, i32 15
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.b2BodySim, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.b2BodySim, ptr %189, i32 0, i32 1
  %191 = load <2 x float>, ptr %188, align 4
  %192 = load <2 x float>, ptr %190, align 4
  %193 = call <2 x float> @b2Sub(<2 x float> %191, <2 x float> %192)
  store <2 x float> %193, ptr %25, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %186, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %194 = load ptr, ptr %20, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.b2DistanceJoint, ptr %194, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %195, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %196 = load ptr, ptr %20, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.b2DistanceJoint, ptr %196, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %197, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %198 = load <2 x float>, ptr %27, align 4
  %199 = load <2 x float>, ptr %26, align 4
  %200 = call <2 x float> @b2Sub(<2 x float> %198, <2 x float> %199)
  store <2 x float> %200, ptr %29, align 4
  %201 = load ptr, ptr %20, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.b2DistanceJoint, ptr %201, i32 0, i32 15
  %203 = load <2 x float>, ptr %29, align 4
  %204 = load <2 x float>, ptr %202, align 4
  %205 = call <2 x float> @b2Add(<2 x float> %203, <2 x float> %204)
  store <2 x float> %205, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %206 = load <2 x float>, ptr %28, align 4
  %207 = call <2 x float> @b2Normalize(<2 x float> %206)
  store <2 x float> %207, ptr %30, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %208 = load <2 x float>, ptr %26, align 4
  %209 = load <2 x float>, ptr %30, align 4
  %210 = call float @b2Cross(<2 x float> %208, <2 x float> %209)
  store float %210, ptr %31, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %211 = load <2 x float>, ptr %27, align 4
  %212 = load <2 x float>, ptr %30, align 4
  %213 = call float @b2Cross(<2 x float> %211, <2 x float> %212)
  store float %213, ptr %32, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %214 = load float, ptr %16, align 4, !tbaa !31
  %215 = load float, ptr %18, align 4, !tbaa !31
  %216 = fadd float %214, %215
  %217 = load float, ptr %17, align 4, !tbaa !31
  %218 = load float, ptr %31, align 4, !tbaa !31
  %219 = fmul float %217, %218
  %220 = load float, ptr %31, align 4, !tbaa !31
  %221 = call float @llvm.fmuladd.f32(float %219, float %220, float %216)
  %222 = load float, ptr %19, align 4, !tbaa !31
  %223 = load float, ptr %32, align 4, !tbaa !31
  %224 = fmul float %222, %223
  %225 = load float, ptr %32, align 4, !tbaa !31
  %226 = call float @llvm.fmuladd.f32(float %224, float %225, float %221)
  store float %226, ptr %33, align 4, !tbaa !31
  %227 = load float, ptr %33, align 4, !tbaa !31
  %228 = fcmp ogt float %227, 0.000000e+00
  br i1 %228, label %229, label %232

229:                                              ; preds = %151
  %230 = load float, ptr %33, align 4, !tbaa !31
  %231 = fdiv float 1.000000e+00, %230
  br label %233

232:                                              ; preds = %151
  br label %233

233:                                              ; preds = %232, %229
  %234 = phi float [ %231, %229 ], [ 0.000000e+00, %232 ]
  %235 = load ptr, ptr %20, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.b2DistanceJoint, ptr %235, i32 0, i32 17
  store float %234, ptr %236, align 4, !tbaa !41
  %237 = load ptr, ptr %20, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.b2DistanceJoint, ptr %237, i32 0, i32 16
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #8
  %239 = load ptr, ptr %20, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.b2DistanceJoint, ptr %239, i32 0, i32 1
  %241 = load float, ptr %240, align 4, !tbaa !42
  %242 = load ptr, ptr %20, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.b2DistanceJoint, ptr %242, i32 0, i32 2
  %244 = load float, ptr %243, align 4, !tbaa !43
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.b2StepContext, ptr %245, i32 0, i32 2
  %247 = load float, ptr %246, align 8, !tbaa !44
  %248 = call { <2 x float>, float } @b2MakeSoft(float noundef %241, float noundef %244, float noundef %247)
  store { <2 x float>, float } %248, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %238, ptr align 4 %34, i64 12, i1 false), !tbaa.struct !45
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #8
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.b2StepContext, ptr %249, i32 0, i32 25
  %251 = load i8, ptr %250, align 4, !tbaa !46, !range !47, !noundef !48
  %252 = trunc i8 %251 to i1
  %253 = zext i1 %252 to i32
  %254 = icmp eq i32 %253, 0
  br i1 %254, label %255, label %264

255:                                              ; preds = %233
  %256 = load ptr, ptr %20, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.b2DistanceJoint, ptr %256, i32 0, i32 7
  store float 0.000000e+00, ptr %257, align 4, !tbaa !49
  %258 = load ptr, ptr %20, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.b2DistanceJoint, ptr %258, i32 0, i32 8
  store float 0.000000e+00, ptr %259, align 4, !tbaa !50
  %260 = load ptr, ptr %20, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.b2DistanceJoint, ptr %260, i32 0, i32 9
  store float 0.000000e+00, ptr %261, align 4, !tbaa !51
  %262 = load ptr, ptr %20, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.b2DistanceJoint, ptr %262, i32 0, i32 10
  store float 0.000000e+00, ptr %263, align 4, !tbaa !52
  br label %264

264:                                              ; preds = %255, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #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) #5

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

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

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

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

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

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

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

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 = { 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 #4 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 44}
!38 = !{!"b2DistanceJoint", !13, i64 0, !13, i64 4, !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, !11, i64 44, !11, i64 48, !12, i64 52, !12, i64 60, !12, i64 68, !19, i64 76, !13, i64 88, !21, i64 92, !21, i64 93, !21, i64 94}
!39 = !{!38, !11, i64 48}
!40 = !{i64 0, i64 4, !31, i64 4, i64 4, !31}
!41 = !{!38, !13, i64 88}
!42 = !{!38, !13, i64 4}
!43 = !{!38, !13, i64 8}
!44 = !{!18, !13, i64 8}
!45 = !{i64 0, i64 4, !31, i64 4, i64 4, !31, i64 8, i64 4, !31}
!46 = !{!18, !21, i64 172}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!38, !13, i64 28}
!50 = !{!38, !13, i64 32}
!51 = !{!38, !13, i64 36}
!52 = !{!38, !13, i64 40}


; 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 [70 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 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> @b2Sub(<2 x float>, <2 x float>) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareDistanceJoint(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, 0
  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 217) #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 227) #7
  %.not86 = icmp eq i32 %27, 0
  br i1 %.not86, 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 = load i32, ptr %19, align 8, !tbaa !21
  %49 = icmp eq i32 %48, 2
  %50 = select i1 %49, i32 %37, i32 -1
  %51 = getelementptr inbounds i8, ptr %0, i64 92
  store i32 %50, ptr %51, align 4, !tbaa !26
  %52 = load i32, ptr %33, align 8, !tbaa !21
  %53 = icmp eq i32 %52, 2
  %54 = select i1 %53, i32 %39, i32 -1
  %55 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %54, ptr %55, align 4, !tbaa !28
  %56 = getelementptr inbounds i8, ptr %0, i64 100
  %57 = getelementptr inbounds i8, ptr %40, i64 8
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  %59 = getelementptr inbounds i8, ptr %40, i64 40
  %60 = load <2 x float>, ptr %58, align 4
  %61 = load <2 x float>, ptr %59, align 4
  %62 = tail call <2 x float> @b2Sub(<2 x float> %60, <2 x float> %61)
  %63 = load <2 x float>, ptr %57, align 4
  %64 = tail call <2 x float> @b2RotateVector(<2 x float> %63, <2 x float> %62)
  store <2 x float> %64, ptr %56, align 4
  %65 = getelementptr inbounds i8, ptr %0, i64 108
  %66 = getelementptr inbounds i8, ptr %41, i64 8
  %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 = load <2 x float>, ptr %66, align 4
  %73 = tail call <2 x float> @b2RotateVector(<2 x float> %72, <2 x float> %71)
  store <2 x float> %73, ptr %65, align 4
  %74 = getelementptr inbounds i8, ptr %0, i64 116
  %75 = getelementptr inbounds i8, ptr %41, i64 16
  %76 = getelementptr inbounds i8, ptr %40, i64 16
  %77 = load <2 x float>, ptr %75, align 4
  %78 = load <2 x float>, ptr %76, align 4
  %79 = tail call <2 x float> @b2Sub(<2 x float> %77, <2 x float> %78)
  store <2 x float> %79, ptr %74, align 4
  %.sroa.013.0.copyload = load <2 x float>, ptr %56, align 4
  %.sroa.011.0.copyload = load <2 x float>, ptr %65, align 4
  %80 = tail call <2 x float> @b2Sub(<2 x float> %.sroa.011.0.copyload, <2 x float> %.sroa.013.0.copyload)
  %81 = load <2 x float>, ptr %74, align 4
  %82 = tail call <2 x float> @b2Add(<2 x float> %80, <2 x float> %81)
  %83 = tail call <2 x float> @b2Normalize(<2 x float> %82)
  %84 = tail call float @b2Cross(<2 x float> %.sroa.013.0.copyload, <2 x float> %83)
  %85 = tail call float @b2Cross(<2 x float> %.sroa.011.0.copyload, <2 x float> %83)
  %86 = fadd <2 x float> %43, %45
  %87 = extractelement <2 x float> %86, i64 0
  %88 = extractelement <2 x float> %43, i64 1
  %89 = fmul float %88, %84
  %90 = tail call float @llvm.fmuladd.f32(float %89, float %84, float %87)
  %91 = extractelement <2 x float> %45, i64 1
  %92 = fmul float %91, %85
  %93 = tail call float @llvm.fmuladd.f32(float %92, float %85, float %90)
  %94 = fcmp ogt float %93, 0.000000e+00
  %95 = fdiv float 1.000000e+00, %93
  %96 = select i1 %94, float %95, float 0.000000e+00
  %97 = getelementptr inbounds i8, ptr %0, i64 136
  store float %96, ptr %97, align 4, !tbaa !29
  %98 = getelementptr inbounds i8, ptr %0, i64 124
  %99 = getelementptr inbounds i8, ptr %0, i64 52
  %100 = load float, ptr %99, align 4, !tbaa !30
  %101 = getelementptr inbounds i8, ptr %0, i64 56
  %102 = load float, ptr %101, align 4, !tbaa !31
  %103 = getelementptr inbounds i8, ptr %1, i64 8
  %104 = load float, ptr %103, align 8, !tbaa !32
  %105 = tail call { <2 x float>, float } @b2MakeSoft(float noundef %100, float noundef %102, float noundef %104)
  %.fca.0.extract = extractvalue { <2 x float>, float } %105, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %105, 1
  store <2 x float> %.fca.0.extract, ptr %98, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 132
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !25
  %106 = getelementptr inbounds i8, ptr %1, i64 172
  %107 = load i8, ptr %106, align 4, !tbaa !33, !range !34, !noundef !35
  %108 = icmp eq i8 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %29
  %110 = getelementptr inbounds i8, ptr %0, i64 76
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %110, i8 0, i64 16, i1 false)
  br label %111

111:                                              ; preds = %109, %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> @b2Add(<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 44}
!27 = !{!"b2DistanceJoint", !11, i64 0, !11, i64 4, !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, !7, i64 44, !7, i64 48, !10, i64 52, !10, i64 60, !10, i64 68, !16, i64 76, !11, i64 88, !19, i64 92, !19, i64 93, !19, i64 94}
!28 = !{!27, !7, i64 48}
!29 = !{!27, !11, i64 88}
!30 = !{!27, !11, i64 4}
!31 = !{!27, !11, i64 8}
!32 = !{!15, !11, i64 8}
!33 = !{!15, !19, i64 172}
!34 = !{i8 0, i8 2}
!35 = !{}


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