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

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@b2Vec2_zero = external hidden constant %struct.b2Vec2, align 4

; 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: nounwind uwtable
define dso_local void @b2PrepareWeldJoint(ptr noundef %0, ptr noundef %1) #3 {
  %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 float, align 4
  %29 = alloca %struct.b2Softness, align 4
  %30 = alloca { <2 x float>, float }, align 8
  %31 = alloca %struct.b2Softness, align 4
  %32 = 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 %33

33:                                               ; preds = %2
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.b2JointSim, ptr %34, i32 0, i32 3
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 6
  br i1 %37, label %42, label %38

38:                                               ; preds = %33
  %39 = call i32 @b2InternalAssertFcn(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 106)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %42

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

42:                                               ; preds = %41, %38, %33
  br label %43

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

61:                                               ; preds = %43
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.b2Body, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 8, !tbaa !23
  %65 = icmp eq i32 %64, 2
  br i1 %65, label %75, label %66

66:                                               ; preds = %61
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.b2Body, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !23
  %70 = icmp eq i32 %69, 2
  br i1 %70, label %75, label %71

71:                                               ; preds = %66
  %72 = call i32 @b2InternalAssertFcn(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 117)
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %75

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

75:                                               ; preds = %74, %71, %66, %61
  br label %76

76:                                               ; preds = %75
  br label %77

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

134:                                              ; preds = %77
  %135 = load i32, ptr %12, align 4, !tbaa !15
  br label %137

136:                                              ; preds = %77
  br label %137

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

145:                                              ; preds = %137
  %146 = load i32, ptr %13, align 4, !tbaa !15
  br label %148

147:                                              ; preds = %137
  br label %148

148:                                              ; preds = %147, %145
  %149 = phi i32 [ %146, %145 ], [ -1, %147 ]
  %150 = load ptr, ptr %20, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.b2WeldJoint, ptr %150, i32 0, i32 10
  store i32 %149, ptr %151, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.b2BodySim, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.b2Transform, ptr %153, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %154, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.b2BodySim, ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds %struct.b2Transform, ptr %156, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %157, i64 8, i1 false), !tbaa.struct !40
  %158 = load ptr, ptr %20, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.b2WeldJoint, ptr %158, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %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 %24, align 4
  %167 = load <2 x float>, ptr %21, align 4
  %168 = load <2 x float>, ptr %24, align 4
  %169 = call <2 x float> @b2RotateVector(<2 x float> %167, <2 x float> %168)
  store <2 x float> %169, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %159, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  %170 = load ptr, ptr %20, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.b2WeldJoint, ptr %170, i32 0, i32 12
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.b2JointSim, ptr %172, i32 0, i32 5
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.b2BodySim, ptr %174, i32 0, i32 4
  %176 = load <2 x float>, ptr %173, align 4
  %177 = load <2 x float>, ptr %175, align 4
  %178 = call <2 x float> @b2Sub(<2 x float> %176, <2 x float> %177)
  store <2 x float> %178, ptr %26, align 4
  %179 = load <2 x float>, ptr %22, align 4
  %180 = load <2 x float>, ptr %26, align 4
  %181 = call <2 x float> @b2RotateVector(<2 x float> %179, <2 x float> %180)
  store <2 x float> %181, ptr %25, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %171, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  %182 = load ptr, ptr %20, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.b2WeldJoint, ptr %182, i32 0, i32 13
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.b2BodySim, ptr %184, i32 0, i32 1
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.b2BodySim, ptr %186, i32 0, i32 1
  %188 = load <2 x float>, ptr %185, align 4
  %189 = load <2 x float>, ptr %187, align 4
  %190 = call <2 x float> @b2Sub(<2 x float> %188, <2 x float> %189)
  store <2 x float> %190, ptr %27, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %183, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  %191 = load <2 x float>, ptr %22, align 4
  %192 = load <2 x float>, ptr %21, align 4
  %193 = call float @b2RelativeAngle(<2 x float> %191, <2 x float> %192)
  %194 = load ptr, ptr %20, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.b2WeldJoint, ptr %194, i32 0, i32 0
  %196 = load float, ptr %195, align 4, !tbaa !41
  %197 = fsub float %193, %196
  %198 = load ptr, ptr %20, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.b2WeldJoint, ptr %198, i32 0, i32 14
  store float %197, ptr %199, align 4, !tbaa !42
  %200 = load ptr, ptr %20, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.b2WeldJoint, ptr %200, i32 0, i32 14
  %202 = load float, ptr %201, align 4, !tbaa !42
  %203 = call float @b2UnwindAngle(float noundef %202)
  %204 = load ptr, ptr %20, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.b2WeldJoint, ptr %204, i32 0, i32 14
  store float %203, ptr %205, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %206 = load float, ptr %17, align 4, !tbaa !31
  %207 = load float, ptr %19, align 4, !tbaa !31
  %208 = fadd float %206, %207
  store float %208, ptr %28, align 4, !tbaa !31
  %209 = load float, ptr %28, align 4, !tbaa !31
  %210 = fcmp ogt float %209, 0.000000e+00
  br i1 %210, label %211, label %214

211:                                              ; preds = %148
  %212 = load float, ptr %28, align 4, !tbaa !31
  %213 = fdiv float 1.000000e+00, %212
  br label %215

214:                                              ; preds = %148
  br label %215

215:                                              ; preds = %214, %211
  %216 = phi float [ %213, %211 ], [ 0.000000e+00, %214 ]
  %217 = load ptr, ptr %20, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.b2WeldJoint, ptr %217, i32 0, i32 15
  store float %216, ptr %218, align 4, !tbaa !43
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.b2WeldJoint, ptr %219, i32 0, i32 1
  %221 = load float, ptr %220, align 4, !tbaa !44
  %222 = fcmp oeq float %221, 0.000000e+00
  br i1 %222, label %223, label %228

223:                                              ; preds = %215
  %224 = load ptr, ptr %20, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.b2WeldJoint, ptr %224, i32 0, i32 5
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.b2StepContext, ptr %226, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %225, ptr align 4 %227, i64 12, i1 false), !tbaa.struct !45
  br label %241

228:                                              ; preds = %215
  %229 = load ptr, ptr %20, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.b2WeldJoint, ptr %229, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  %231 = load ptr, ptr %20, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.b2WeldJoint, ptr %231, i32 0, i32 1
  %233 = load float, ptr %232, align 4, !tbaa !44
  %234 = load ptr, ptr %20, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.b2WeldJoint, ptr %234, i32 0, i32 2
  %236 = load float, ptr %235, align 4, !tbaa !46
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.b2StepContext, ptr %237, i32 0, i32 2
  %239 = load float, ptr %238, align 8, !tbaa !47
  %240 = call { <2 x float>, float } @b2MakeSoft(float noundef %233, float noundef %236, float noundef %239)
  store { <2 x float>, float } %240, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %30, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %230, ptr align 4 %29, i64 12, i1 false), !tbaa.struct !45
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  br label %241

241:                                              ; preds = %228, %223
  %242 = load ptr, ptr %20, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.b2WeldJoint, ptr %242, i32 0, i32 3
  %244 = load float, ptr %243, align 4, !tbaa !48
  %245 = fcmp oeq float %244, 0.000000e+00
  br i1 %245, label %246, label %251

246:                                              ; preds = %241
  %247 = load ptr, ptr %20, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.b2WeldJoint, ptr %247, i32 0, i32 6
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.b2StepContext, ptr %249, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %248, ptr align 4 %250, i64 12, i1 false), !tbaa.struct !45
  br label %264

251:                                              ; preds = %241
  %252 = load ptr, ptr %20, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.b2WeldJoint, ptr %252, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  %254 = load ptr, ptr %20, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.b2WeldJoint, ptr %254, i32 0, i32 3
  %256 = load float, ptr %255, align 4, !tbaa !48
  %257 = load ptr, ptr %20, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.b2WeldJoint, ptr %257, i32 0, i32 4
  %259 = load float, ptr %258, align 4, !tbaa !49
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.b2StepContext, ptr %260, i32 0, i32 2
  %262 = load float, ptr %261, align 8, !tbaa !47
  %263 = call { <2 x float>, float } @b2MakeSoft(float noundef %256, float noundef %259, float noundef %262)
  store { <2 x float>, float } %263, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 8 %32, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %253, ptr align 4 %31, i64 12, i1 false), !tbaa.struct !45
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  br label %264

264:                                              ; preds = %251, %246
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.b2StepContext, ptr %265, i32 0, i32 25
  %267 = load i8, ptr %266, align 4, !tbaa !50, !range !51, !noundef !52
  %268 = trunc i8 %267 to i1
  %269 = zext i1 %268 to i32
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %276

271:                                              ; preds = %264
  %272 = load ptr, ptr %20, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.b2WeldJoint, ptr %272, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %273, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !40
  %274 = load ptr, ptr %20, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.b2WeldJoint, ptr %274, i32 0, i32 8
  store float 0.000000e+00, ptr %275, align 4, !tbaa !53
  br label %276

276:                                              ; preds = %271, %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2UnwindAngle(float noundef) #4

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

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #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, !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 56}
!38 = !{!"b2WeldJoint", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !19, i64 20, !19, i64 32, !12, i64 44, !13, i64 52, !11, i64 56, !11, i64 60, !12, i64 64, !12, i64 72, !12, i64 80, !13, i64 88, !13, i64 92}
!39 = !{!38, !11, i64 60}
!40 = !{i64 0, i64 4, !31, i64 4, i64 4, !31}
!41 = !{!38, !13, i64 0}
!42 = !{!38, !13, i64 88}
!43 = !{!38, !13, i64 92}
!44 = !{!38, !13, i64 4}
!45 = !{i64 0, i64 4, !31, i64 4, i64 4, !31, i64 8, i64 4, !31}
!46 = !{!38, !13, i64 8}
!47 = !{!18, !13, i64 8}
!48 = !{!38, !13, i64 12}
!49 = !{!38, !13, i64 16}
!50 = !{!18, !21, i64 172}
!51 = !{i8 0, i8 2}
!52 = !{}
!53 = !{!38, !13, i64 52}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Vec2 = type { float, float }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [65 x i8], align 1
@b2Vec2_zero = external hidden local_unnamed_addr constant %struct.b2Vec2, align 4

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: nounwind uwtable
define dso_local void @b2PrepareWeldJoint(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 6
  br i1 %5, label %9, label %6

6:                                                ; preds = %2
  %7 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 106) #6
  %.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.5, ptr noundef nonnull @.str.1, i32 noundef 117) #6
  %.not92 = icmp eq i32 %27, 0
  br i1 %.not92, 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 104
  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 108
  store i32 %55, ptr %56, align 4, !tbaa !28
  %57 = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.016.0.copyload = load <2 x float>, ptr %57, align 4
  %58 = getelementptr inbounds i8, ptr %41, i64 8
  %.sroa.014.0.copyload = load <2 x float>, ptr %58, align 4
  %59 = getelementptr inbounds i8, ptr %0, i64 112
  %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.016.0.copyload, <2 x float> %64)
  store <2 x float> %65, ptr %59, align 4
  %66 = getelementptr inbounds i8, ptr %0, i64 120
  %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.014.0.copyload, <2 x float> %71)
  store <2 x float> %72, ptr %66, align 4
  %73 = getelementptr inbounds i8, ptr %0, i64 128
  %74 = getelementptr inbounds i8, ptr %41, i64 16
  %75 = getelementptr inbounds i8, ptr %40, i64 16
  %76 = load <2 x float>, ptr %74, align 4
  %77 = load <2 x float>, ptr %75, align 4
  %78 = tail call <2 x float> @b2Sub(<2 x float> %76, <2 x float> %77)
  store <2 x float> %78, ptr %73, align 4
  %79 = tail call float @b2RelativeAngle(<2 x float> %.sroa.014.0.copyload, <2 x float> %.sroa.016.0.copyload)
  %80 = load float, ptr %48, align 4, !tbaa !29
  %81 = fsub float %79, %80
  %82 = getelementptr inbounds i8, ptr %0, i64 136
  store float %81, ptr %82, align 4, !tbaa !30
  %83 = tail call float @b2UnwindAngle(float noundef %81)
  store float %83, ptr %82, align 4, !tbaa !30
  %84 = fadd <2 x float> %43, %45
  %85 = extractelement <2 x float> %84, i64 1
  %86 = fcmp ogt float %85, 0.000000e+00
  %87 = fdiv float 1.000000e+00, %85
  %88 = select i1 %86, float %87, float 0.000000e+00
  %89 = getelementptr inbounds i8, ptr %0, i64 140
  store float %88, ptr %89, align 4, !tbaa !31
  %90 = getelementptr inbounds i8, ptr %0, i64 52
  %91 = load float, ptr %90, align 4, !tbaa !32
  %92 = fcmp oeq float %91, 0.000000e+00
  %93 = getelementptr inbounds i8, ptr %0, i64 68
  br i1 %92, label %94, label %96

94:                                               ; preds = %29
  %95 = getelementptr inbounds i8, ptr %1, i64 20
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %93, ptr noundef nonnull align 4 dereferenceable(12) %95, i64 12, i1 false), !tbaa.struct !33
  br label %102

96:                                               ; preds = %29
  %97 = getelementptr inbounds i8, ptr %0, i64 56
  %98 = load float, ptr %97, align 4, !tbaa !34
  %99 = getelementptr inbounds i8, ptr %1, i64 8
  %100 = load float, ptr %99, align 8, !tbaa !35
  %101 = tail call { <2 x float>, float } @b2MakeSoft(float noundef %91, float noundef %98, float noundef %100)
  %.fca.0.extract2 = extractvalue { <2 x float>, float } %101, 0
  %.fca.1.extract3 = extractvalue { <2 x float>, float } %101, 1
  store <2 x float> %.fca.0.extract2, ptr %93, align 4
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 76
  store float %.fca.1.extract3, ptr %.sroa.47.0..sroa_idx, align 4, !tbaa !25
  br label %102

102:                                              ; preds = %96, %94
  %103 = getelementptr inbounds i8, ptr %0, i64 60
  %104 = load float, ptr %103, align 4, !tbaa !36
  %105 = fcmp oeq float %104, 0.000000e+00
  %106 = getelementptr inbounds i8, ptr %0, i64 80
  br i1 %105, label %107, label %109

107:                                              ; preds = %102
  %108 = getelementptr inbounds i8, ptr %1, i64 20
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %106, ptr noundef nonnull align 4 dereferenceable(12) %108, i64 12, i1 false), !tbaa.struct !33
  br label %115

109:                                              ; preds = %102
  %110 = getelementptr inbounds i8, ptr %0, i64 64
  %111 = load float, ptr %110, align 4, !tbaa !37
  %112 = getelementptr inbounds i8, ptr %1, i64 8
  %113 = load float, ptr %112, align 8, !tbaa !35
  %114 = tail call { <2 x float>, float } @b2MakeSoft(float noundef %104, float noundef %111, float noundef %113)
  %.fca.0.extract = extractvalue { <2 x float>, float } %114, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %114, 1
  store <2 x float> %.fca.0.extract, ptr %106, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !25
  br label %115

115:                                              ; preds = %109, %107
  %116 = getelementptr inbounds i8, ptr %1, i64 172
  %117 = load i8, ptr %116, align 4, !tbaa !38, !range !39, !noundef !40
  %118 = icmp eq i8 %117, 0
  br i1 %118, label %119, label %123

119:                                              ; preds = %115
  %120 = getelementptr inbounds i8, ptr %0, i64 92
  %121 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %121, ptr %120, align 4
  %122 = getelementptr inbounds i8, ptr %0, i64 100
  store float 0.000000e+00, ptr %122, align 4, !tbaa !41
  br label %123

123:                                              ; preds = %119, %115
  ret void
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2UnwindAngle(float noundef) local_unnamed_addr #3

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

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 = { 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 56}
!27 = !{!"b2WeldJoint", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !16, i64 20, !16, i64 32, !10, i64 44, !11, i64 52, !7, i64 56, !7, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !11, i64 88, !11, i64 92}
!28 = !{!27, !7, i64 60}
!29 = !{!27, !11, i64 0}
!30 = !{!27, !11, i64 88}
!31 = !{!27, !11, i64 92}
!32 = !{!27, !11, i64 4}
!33 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25}
!34 = !{!27, !11, i64 8}
!35 = !{!15, !11, i64 8}
!36 = !{!27, !11, i64 12}
!37 = !{!27, !11, i64 16}
!38 = !{!15, !19, i64 172}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = !{!27, !11, i64 52}


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