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

@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareRevoluteJoint(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %struct.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 float, align 4
  %27 = alloca %struct.b2Softness, align 4
  %28 = 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 %29

29:                                               ; preds = %2
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.b2JointSim, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp eq i32 %32, 5
  br i1 %33, label %38, label %34

34:                                               ; preds = %29
  %35 = call i32 @b2InternalAssertFcn(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 192)
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

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

38:                                               ; preds = %37, %34, %29
  br label %39

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

57:                                               ; preds = %39
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.b2Body, ptr %58, i32 0, i32 2
  %60 = load i32, ptr %59, align 8, !tbaa !23
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %71, label %62

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

67:                                               ; preds = %62
  %68 = call i32 @b2InternalAssertFcn(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 203)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %71

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

71:                                               ; preds = %70, %67, %62, %57
  br label %72

72:                                               ; preds = %71
  br label %73

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

130:                                              ; preds = %73
  %131 = load i32, ptr %12, align 4, !tbaa !15
  br label %133

132:                                              ; preds = %73
  br label %133

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

141:                                              ; preds = %133
  %142 = load i32, ptr %13, align 4, !tbaa !15
  br label %144

143:                                              ; preds = %133
  br label %144

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

213:                                              ; preds = %144
  %214 = load float, ptr %26, align 4, !tbaa !31
  %215 = fdiv float 1.000000e+00, %214
  br label %217

216:                                              ; preds = %144
  br label %217

217:                                              ; preds = %216, %213
  %218 = phi float [ %215, %213 ], [ 0.000000e+00, %216 ]
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %219, i32 0, i32 18
  store float %218, ptr %220, align 4, !tbaa !43
  %221 = load ptr, ptr %20, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %221, i32 0, i32 19
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %223, i32 0, i32 5
  %225 = load float, ptr %224, align 4, !tbaa !44
  %226 = load ptr, ptr %20, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %226, i32 0, i32 6
  %228 = load float, ptr %227, align 4, !tbaa !45
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.b2StepContext, ptr %229, i32 0, i32 2
  %231 = load float, ptr %230, align 8, !tbaa !46
  %232 = call { <2 x float>, float } @b2MakeSoft(float noundef %225, float noundef %228, float noundef %231)
  store { <2 x float>, float } %232, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 8 %28, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %222, ptr align 4 %27, i64 12, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.b2StepContext, ptr %233, i32 0, i32 25
  %235 = load i8, ptr %234, align 4, !tbaa !48, !range !49, !noundef !50
  %236 = trunc i8 %235 to i1
  %237 = zext i1 %236 to i32
  %238 = icmp eq i32 %237, 0
  br i1 %238, label %239, label %250

239:                                              ; preds = %217
  %240 = load ptr, ptr %20, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %240, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %241, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !40
  %242 = load ptr, ptr %20, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %242, i32 0, i32 1
  store float 0.000000e+00, ptr %243, align 4, !tbaa !51
  %244 = load ptr, ptr %20, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %244, i32 0, i32 2
  store float 0.000000e+00, ptr %245, align 4, !tbaa !52
  %246 = load ptr, ptr %20, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %246, i32 0, i32 3
  store float 0.000000e+00, ptr %247, align 4, !tbaa !53
  %248 = load ptr, ptr %20, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %248, i32 0, i32 4
  store float 0.000000e+00, ptr %249, align 4, !tbaa !54
  br label %250

250:                                              ; preds = %239, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #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) #2

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 52}
!38 = !{!"b2RevoluteJoint", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !11, i64 52, !11, i64 56, !12, i64 60, !12, i64 68, !12, i64 76, !13, i64 84, !13, i64 88, !19, i64 92, !21, i64 104, !21, i64 105, !21, i64 106}
!39 = !{!38, !11, i64 56}
!40 = !{i64 0, i64 4, !31, i64 4, i64 4, !31}
!41 = !{!38, !13, i64 40}
!42 = !{!38, !13, i64 84}
!43 = !{!38, !13, i64 88}
!44 = !{!38, !13, i64 24}
!45 = !{!38, !13, i64 28}
!46 = !{!18, !13, i64 8}
!47 = !{i64 0, i64 4, !31, i64 4, i64 4, !31, i64 8, i64 4, !31}
!48 = !{!18, !21, i64 172}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!38, !13, i64 8}
!52 = !{!38, !13, i64 12}
!53 = !{!38, !13, i64 16}
!54 = !{!38, !13, i64 20}


; 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 [70 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2PrepareRevoluteJoint(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 {
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 5
  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 192) #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 203) #6
  %.not76 = icmp eq i32 %27, 0
  br i1 %.not76, 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 100
  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 104
  store i32 %54, ptr %55, align 4, !tbaa !28
  %56 = getelementptr inbounds i8, ptr %0, i64 108
  %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 116
  %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 124
  %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
  %80 = load <2 x float>, ptr %66, align 4
  %81 = load <2 x float>, ptr %57, align 4
  %82 = tail call float @b2RelativeAngle(<2 x float> %80, <2 x float> %81)
  %83 = getelementptr inbounds i8, ptr %0, i64 88
  %84 = load float, ptr %83, align 4, !tbaa !29
  %85 = fsub float %82, %84
  %86 = getelementptr inbounds i8, ptr %0, i64 132
  store float %85, ptr %86, align 4, !tbaa !30
  %87 = tail call float @b2UnwindAngle(float noundef %85)
  store float %87, ptr %86, align 4, !tbaa !30
  %88 = fadd <2 x float> %43, %45
  %89 = extractelement <2 x float> %88, i64 1
  %90 = fcmp ogt float %89, 0.000000e+00
  %91 = fdiv float 1.000000e+00, %89
  %92 = select i1 %90, float %91, float 0.000000e+00
  %93 = getelementptr inbounds i8, ptr %0, i64 136
  store float %92, ptr %93, align 4, !tbaa !31
  %94 = getelementptr inbounds i8, ptr %0, i64 140
  %95 = getelementptr inbounds i8, ptr %0, i64 72
  %96 = load float, ptr %95, align 4, !tbaa !32
  %97 = getelementptr inbounds i8, ptr %0, i64 76
  %98 = load float, ptr %97, align 4, !tbaa !33
  %99 = getelementptr inbounds i8, ptr %1, i64 8
  %100 = load float, ptr %99, align 8, !tbaa !34
  %101 = tail call { <2 x float>, float } @b2MakeSoft(float noundef %96, float noundef %98, float noundef %100)
  %.fca.0.extract = extractvalue { <2 x float>, float } %101, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %101, 1
  store <2 x float> %.fca.0.extract, ptr %94, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 148
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !25
  %102 = getelementptr inbounds i8, ptr %1, i64 172
  %103 = load i8, ptr %102, align 4, !tbaa !35, !range !36, !noundef !37
  %104 = icmp eq i8 %103, 0
  br i1 %104, label %105, label %109

105:                                              ; preds = %29
  %106 = getelementptr inbounds i8, ptr %0, i64 48
  %107 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %107, ptr %106, align 4
  %108 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %108, i8 0, i64 16, i1 false)
  br label %109

109:                                              ; preds = %105, %29
  ret void
}

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 52}
!27 = !{!"b2RevoluteJoint", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 52, !7, i64 56, !10, i64 60, !10, i64 68, !10, i64 76, !11, i64 84, !11, i64 88, !16, i64 92, !19, i64 104, !19, i64 105, !19, i64 106}
!28 = !{!27, !7, i64 56}
!29 = !{!27, !11, i64 40}
!30 = !{!27, !11, i64 84}
!31 = !{!27, !11, i64 88}
!32 = !{!27, !11, i64 24}
!33 = !{!27, !11, i64 28}
!34 = !{!15, !11, i64 8}
!35 = !{!15, !19, i64 172}
!36 = !{i8 0, i8 2}
!37 = !{}


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