; LLVM IR from erincatto/box2d :: src (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.b2JointId = type { i32, i16, i16 }
%struct.b2WorldId = type { i16, i16 }
%struct.b2JointPair = type { ptr, ptr }
%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 }
%struct.b2Softness = type { float, float, float }
%struct.b2RevoluteJointDef = type { %struct.b2BodyId, %struct.b2BodyId, %struct.b2Vec2, %struct.b2Vec2, float, i8, float, float, i8, float, float, i8, float, float, float, i8, ptr, i32 }
%struct.b2BodyId = type { i32, i16, i16 }
%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.b2AtomicInt = type { 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 }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon = 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.b2JointSim = type { i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %union.anon.0 }
%union.anon.0 = 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.b2Joint = type { ptr, i32, i32, i32, [2 x %struct.b2JointEdge], i32, i32, i32, i32, float, i32, i16, i8, i8 }
%struct.b2JointEdge = type { i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@b2Vec2_zero = external hidden constant %struct.b2Vec2, align 4
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

declare ptr @b2GetWorldFromId(i32) #3

declare ptr @b2GetBodyFullId(ptr noundef, i64) #3

; Function Attrs: nounwind uwtable
declare hidden { ptr, ptr } @b2CreateJoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, i32 noundef, i1 noundef zeroext) #5

; Function Attrs: nounwind uwtable
declare hidden void @b2DestroyContactsBetweenBodies(ptr noundef, ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2ClampFloat(float noundef, float noundef, float noundef) #6

; Function Attrs: nounwind uwtable
define dso_local i64 @b2CreateRevoluteJoint(i32 %0, ptr noundef %1) #5 {
  %3 = alloca %struct.b2JointId, align 4
  %4 = alloca %struct.b2WorldId, align 2
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.b2JointPair, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.b2RevoluteJoint, align 4
  store i32 %0, ptr %4, align 2
  store ptr %1, ptr %5, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %2
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %14, i32 0, i32 17
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = icmp eq i32 %16, 1152023
  br i1 %17, label %22, label %18

18:                                               ; preds = %13
  %19 = call i32 @b2InternalAssertFcn(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 501)
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  call void @llvm.trap()
  br label %22

22:                                               ; preds = %21, %18, %13
  br label %23

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %25, i32 0, i32 9
  %27 = load float, ptr %26, align 4, !tbaa !17
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %28, i32 0, i32 10
  %30 = load float, ptr %29, align 8, !tbaa !18
  %31 = fcmp ole float %27, %30
  br i1 %31, label %36, label %32

32:                                               ; preds = %24
  %33 = call i32 @b2InternalAssertFcn(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 502)
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  call void @llvm.trap()
  br label %36

36:                                               ; preds = %35, %32, %24
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %39, i32 0, i32 9
  %41 = load float, ptr %40, align 4, !tbaa !17
  %42 = fcmp oge float %41, 0xC007E04860000000
  br i1 %42, label %47, label %43

43:                                               ; preds = %38
  %44 = call i32 @b2InternalAssertFcn(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 503)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  call void @llvm.trap()
  br label %47

47:                                               ; preds = %46, %43, %38
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %50, i32 0, i32 10
  %52 = load float, ptr %51, align 8, !tbaa !18
  %53 = fcmp ole float %52, 0x4007E04860000000
  br i1 %53, label %58, label %54

54:                                               ; preds = %49
  %55 = call i32 @b2InternalAssertFcn(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 504)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

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

58:                                               ; preds = %57, %54, %49
  br label %59

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %60 = load i32, ptr %4, align 2
  %61 = call ptr @b2GetWorldFromId(i32 %60)
  store ptr %61, ptr %6, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %59
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.b2World, ptr %63, i32 0, i32 61
  %65 = load i8, ptr %64, align 1, !tbaa !19, !range !31, !noundef !32
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %73, label %69

69:                                               ; preds = %62
  %70 = call i32 @b2InternalAssertFcn(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 508)
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  call void @llvm.trap()
  br label %73

73:                                               ; preds = %72, %69, %62
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.b2World, ptr %76, i32 0, i32 61
  %78 = load i8, ptr %77, align 1, !tbaa !19, !range !31, !noundef !32
  %79 = trunc i8 %78 to i1
  br i1 %79, label %80, label %84

80:                                               ; preds = %75
  %81 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 0
  store i32 0, ptr %81, align 4, !tbaa !33
  %82 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 1
  store i16 0, ptr %82, align 4, !tbaa !35
  %83 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 2
  store i16 0, ptr %83, align 2, !tbaa !36
  store i32 1, ptr %7, align 4
  br label %237

84:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %86, i32 0, i32 0
  %88 = load i64, ptr %87, align 8
  %89 = call ptr @b2GetBodyFullId(ptr noundef %85, i64 %88)
  store ptr %89, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %91, i32 0, i32 1
  %93 = load i64, ptr %92, align 8
  %94 = call ptr @b2GetBodyFullId(ptr noundef %90, i64 %93)
  store ptr %94, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %98, i32 0, i32 16
  %100 = load ptr, ptr %99, align 8, !tbaa !37
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %101, i32 0, i32 14
  %103 = load float, ptr %102, align 8, !tbaa !38
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %104, i32 0, i32 15
  %106 = load i8, ptr %105, align 4, !tbaa !39, !range !31, !noundef !32
  %107 = trunc i8 %106 to i1
  %108 = call { ptr, ptr } @b2CreateJoint(ptr noundef %95, ptr noundef %96, ptr noundef %97, ptr noundef %100, float noundef %103, i32 noundef 5, i1 noundef zeroext %107)
  %109 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %110 = extractvalue { ptr, ptr } %108, 0
  store ptr %110, ptr %109, align 8
  %111 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %112 = extractvalue { ptr, ptr } %108, 1
  store ptr %112, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %113 = getelementptr inbounds %struct.b2JointPair, ptr %10, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !40
  store ptr %114, ptr %11, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.b2JointSim, ptr %115, i32 0, i32 3
  store i32 5, ptr %116, align 4, !tbaa !42
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.b2JointSim, ptr %117, i32 0, i32 4
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %119, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %118, ptr align 8 %120, i64 8, i1 false), !tbaa.struct !44
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.b2JointSim, ptr %121, i32 0, i32 5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %123, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %122, ptr align 8 %124, i64 8, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.start.p0(i64 108, ptr %12) #7
  call void @llvm.memset.p0.i64(ptr align 4 %12, i8 0, i64 108, i1 false)
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.b2JointSim, ptr %125, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %126, ptr align 4 %12, i64 108, i1 false), !tbaa.struct !46
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %127, i32 0, i32 4
  %129 = load float, ptr %128, align 8, !tbaa !49
  %130 = call float @b2ClampFloat(float noundef %129, float noundef 0xC00921FB60000000, float noundef 0x400921FB60000000)
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.b2JointSim, ptr %131, i32 0, i32 10
  %133 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %132, i32 0, i32 9
  store float %130, ptr %133, align 4, !tbaa !50
  %134 = load ptr, ptr %11, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.b2JointSim, ptr %134, i32 0, i32 10
  %136 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %135, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %136, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !44
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.b2JointSim, ptr %137, i32 0, i32 10
  %139 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %138, i32 0, i32 18
  store float 0.000000e+00, ptr %139, align 4, !tbaa !50
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.b2JointSim, ptr %140, i32 0, i32 10
  %142 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %141, i32 0, i32 1
  store float 0.000000e+00, ptr %142, align 4, !tbaa !50
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.b2JointSim, ptr %143, i32 0, i32 10
  %145 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %144, i32 0, i32 2
  store float 0.000000e+00, ptr %145, align 4, !tbaa !50
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.b2JointSim, ptr %146, i32 0, i32 10
  %148 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %147, i32 0, i32 3
  store float 0.000000e+00, ptr %148, align 4, !tbaa !50
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.b2JointSim, ptr %149, i32 0, i32 10
  %151 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %150, i32 0, i32 4
  store float 0.000000e+00, ptr %151, align 4, !tbaa !50
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %152, i32 0, i32 6
  %154 = load float, ptr %153, align 8, !tbaa !51
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.b2JointSim, ptr %155, i32 0, i32 10
  %157 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %156, i32 0, i32 5
  store float %154, ptr %157, align 4, !tbaa !50
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %158, i32 0, i32 7
  %160 = load float, ptr %159, align 4, !tbaa !52
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.b2JointSim, ptr %161, i32 0, i32 10
  %163 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %162, i32 0, i32 6
  store float %160, ptr %163, align 4, !tbaa !50
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %164, i32 0, i32 9
  %166 = load float, ptr %165, align 4, !tbaa !17
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.b2JointSim, ptr %167, i32 0, i32 10
  %169 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %168, i32 0, i32 10
  store float %166, ptr %169, align 4, !tbaa !50
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %170, i32 0, i32 10
  %172 = load float, ptr %171, align 8, !tbaa !18
  %173 = load ptr, ptr %11, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.b2JointSim, ptr %173, i32 0, i32 10
  %175 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %174, i32 0, i32 11
  store float %172, ptr %175, align 4, !tbaa !50
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %176, i32 0, i32 12
  %178 = load float, ptr %177, align 8, !tbaa !53
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.b2JointSim, ptr %179, i32 0, i32 10
  %181 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %180, i32 0, i32 7
  store float %178, ptr %181, align 4, !tbaa !50
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %182, i32 0, i32 13
  %184 = load float, ptr %183, align 4, !tbaa !54
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.b2JointSim, ptr %185, i32 0, i32 10
  %187 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %186, i32 0, i32 8
  store float %184, ptr %187, align 4, !tbaa !50
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %188, i32 0, i32 5
  %190 = load i8, ptr %189, align 4, !tbaa !55, !range !31, !noundef !32
  %191 = trunc i8 %190 to i1
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.b2JointSim, ptr %192, i32 0, i32 10
  %194 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %193, i32 0, i32 20
  %195 = zext i1 %191 to i8
  store i8 %195, ptr %194, align 4, !tbaa !50
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %196, i32 0, i32 8
  %198 = load i8, ptr %197, align 8, !tbaa !56, !range !31, !noundef !32
  %199 = trunc i8 %198 to i1
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.b2JointSim, ptr %200, i32 0, i32 10
  %202 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %201, i32 0, i32 22
  %203 = zext i1 %199 to i8
  store i8 %203, ptr %202, align 2, !tbaa !50
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %204, i32 0, i32 11
  %206 = load i8, ptr %205, align 4, !tbaa !57, !range !31, !noundef !32
  %207 = trunc i8 %206 to i1
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.b2JointSim, ptr %208, i32 0, i32 10
  %210 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %209, i32 0, i32 21
  %211 = zext i1 %207 to i8
  store i8 %211, ptr %210, align 1, !tbaa !50
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %212, i32 0, i32 15
  %214 = load i8, ptr %213, align 4, !tbaa !39, !range !31, !noundef !32
  %215 = trunc i8 %214 to i1
  %216 = zext i1 %215 to i32
  %217 = icmp eq i32 %216, 0
  br i1 %217, label %218, label %222

218:                                              ; preds = %84
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  call void @b2DestroyContactsBetweenBodies(ptr noundef %219, ptr noundef %220, ptr noundef %221)
  br label %222

222:                                              ; preds = %218, %84
  %223 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 0
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.b2JointSim, ptr %224, i32 0, i32 0
  %226 = load i32, ptr %225, align 4, !tbaa !58
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %223, align 4, !tbaa !33
  %228 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 1
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.b2World, ptr %229, i32 0, i32 59
  %231 = load i16, ptr %230, align 4, !tbaa !59
  store i16 %231, ptr %228, align 4, !tbaa !35
  %232 = getelementptr inbounds %struct.b2JointId, ptr %3, i32 0, i32 2
  %233 = getelementptr inbounds %struct.b2JointPair, ptr %10, i32 0, i32 0
  %234 = load ptr, ptr %233, align 8, !tbaa !60
  %235 = getelementptr inbounds %struct.b2Joint, ptr %234, i32 0, i32 11
  %236 = load i16, ptr %235, align 4, !tbaa !61
  store i16 %236, ptr %232, align 2, !tbaa !36
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 108, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, 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
  br label %237

237:                                              ; preds = %222, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %238 = load i64, ptr %3, align 4
  ret i64 %238
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !12, i64 88}
!10 = !{!"b2RevoluteJointDef", !11, i64 0, !11, i64 8, !14, i64 16, !14, i64 24, !15, i64 32, !16, i64 36, !15, i64 40, !15, i64 44, !16, i64 48, !15, i64 52, !15, i64 56, !16, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !16, i64 76, !6, i64 80, !12, i64 88}
!11 = !{!"b2BodyId", !12, i64 0, !13, i64 4, !13, i64 6}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"b2Vec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!10, !15, i64 52}
!18 = !{!10, !15, i64 56}
!19 = !{!20, !16, i64 1799}
!20 = !{!"b2World", !21, i64 0, !23, i64 40, !26, i64 336, !27, i64 1008, !22, i64 1032, !27, i64 1048, !22, i64 1072, !27, i64 1088, !22, i64 1112, !27, i64 1128, !22, i64 1152, !27, i64 1168, !22, i64 1192, !27, i64 1208, !27, i64 1232, !22, i64 1256, !22, i64 1272, !22, i64 1288, !22, i64 1304, !22, i64 1320, !22, i64 1336, !22, i64 1352, !22, i64 1368, !7, i64 1384, !7, i64 1416, !12, i64 1448, !22, i64 1456, !28, i64 1472, !28, i64 1488, !28, i64 1504, !28, i64 1520, !29, i64 1536, !12, i64 1544, !14, i64 1548, !15, i64 1556, !15, i64 1560, !15, i64 1564, !15, i64 1568, !15, i64 1572, !15, i64 1576, !15, i64 1580, !15, i64 1584, !6, i64 1592, !6, i64 1600, !13, i64 1608, !30, i64 1612, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !12, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !15, i64 1784, !12, i64 1788, !12, i64 1792, !13, i64 1796, !16, i64 1798, !16, i64 1799, !16, i64 1800, !16, i64 1801, !16, i64 1802, !16, i64 1803}
!21 = !{!"b2ArenaAllocator", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !22, i64 24}
!22 = !{!"", !6, i64 0, !12, i64 8, !12, i64 12}
!23 = !{!"b2BroadPhase", !7, i64 0, !12, i64 216, !24, i64 224, !22, i64 240, !6, i64 256, !6, i64 264, !12, i64 272, !25, i64 276, !24, i64 280}
!24 = !{!"b2HashSet", !6, i64 0, !12, i64 8, !12, i64 12}
!25 = !{!"b2AtomicInt", !12, i64 0}
!26 = !{!"b2ConstraintGraph", !7, i64 0}
!27 = !{!"b2IdPool", !22, i64 0, !12, i64 16}
!28 = !{!"b2BitSet", !6, i64 0, !12, i64 8, !12, i64 12}
!29 = !{!"long", !7, i64 0}
!30 = !{!"b2Profile", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !12, i64 0}
!34 = !{!"b2JointId", !12, i64 0, !13, i64 4, !13, i64 6}
!35 = !{!34, !13, i64 4}
!36 = !{!34, !13, i64 6}
!37 = !{!10, !6, i64 80}
!38 = !{!10, !15, i64 72}
!39 = !{!10, !16, i64 76}
!40 = !{!41, !6, i64 8}
!41 = !{!"b2JointPair", !6, i64 0, !6, i64 8}
!42 = !{!43, !12, i64 12}
!43 = !{!"b2JointSim", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !14, i64 16, !14, i64 24, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !7, i64 48}
!44 = !{i64 0, i64 4, !45, i64 4, i64 4, !45}
!45 = !{!15, !15, i64 0}
!46 = !{i64 0, i64 4, !45, i64 4, i64 4, !45, i64 8, i64 4, !45, i64 12, i64 4, !45, i64 16, i64 4, !45, i64 20, i64 4, !45, i64 24, i64 4, !45, i64 28, i64 4, !45, i64 32, i64 4, !45, i64 36, i64 4, !45, i64 40, i64 4, !45, i64 44, i64 4, !45, i64 48, i64 4, !45, i64 52, i64 4, !47, i64 56, i64 4, !47, i64 60, i64 4, !45, i64 64, i64 4, !45, i64 68, i64 4, !45, i64 72, i64 4, !45, i64 76, i64 4, !45, i64 80, i64 4, !45, i64 84, i64 4, !45, i64 88, i64 4, !45, i64 92, i64 4, !45, i64 96, i64 4, !45, i64 100, i64 4, !45, i64 104, i64 1, !48, i64 105, i64 1, !48, i64 106, i64 1, !48}
!47 = !{!12, !12, i64 0}
!48 = !{!16, !16, i64 0}
!49 = !{!10, !15, i64 32}
!50 = !{!7, !7, i64 0}
!51 = !{!10, !15, i64 40}
!52 = !{!10, !15, i64 44}
!53 = !{!10, !15, i64 64}
!54 = !{!10, !15, i64 68}
!55 = !{!10, !16, i64 36}
!56 = !{!10, !16, i64 48}
!57 = !{!10, !16, i64 60}
!58 = !{!43, !12, i64 0}
!59 = !{!20, !13, i64 1796}
!60 = !{!41, !6, i64 0}
!61 = !{!62, !13, i64 68}
!62 = !{!"b2Joint", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !7, i64 20, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !15, i64 60, !12, i64 64, !13, i64 68, !16, i64 70, !16, i64 71}


; 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 [61 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@b2Vec2_zero = external hidden local_unnamed_addr constant %struct.b2Vec2, align 4
@.str.10 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1

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

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

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

declare ptr @b2GetWorldFromId(i32) local_unnamed_addr #1

declare ptr @b2GetBodyFullId(ptr noundef, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden { ptr, ptr } @b2CreateJoint(ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @b2DestroyContactsBetweenBodies(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

9:                                                ; preds = %6, %2
  %10 = getelementptr inbounds i8, ptr %1, i64 52
  %11 = load float, ptr %10, align 4, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %1, i64 56
  %13 = load float, ptr %12, align 8, !tbaa !17
  %14 = fcmp ugt float %11, %13
  br i1 %14, label %15, label %18

15:                                               ; preds = %9
  %16 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 502) #5
  %.not57 = icmp eq i32 %16, 0
  br i1 %.not57, label %thread-pre-split, label %17

17:                                               ; preds = %15
  tail call void @llvm.trap()
  unreachable

thread-pre-split:                                 ; preds = %15
  %.pr = load float, ptr %10, align 4, !tbaa !16
  br label %18

18:                                               ; preds = %thread-pre-split, %9
  %19 = phi float [ %.pr, %thread-pre-split ], [ %11, %9 ]
  %20 = fcmp ult float %19, 0xC007E04860000000
  br i1 %20, label %21, label %24

21:                                               ; preds = %18
  %22 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 503) #5
  %.not58 = icmp eq i32 %22, 0
  br i1 %.not58, label %24, label %23

23:                                               ; preds = %21
  tail call void @llvm.trap()
  unreachable

24:                                               ; preds = %21, %18
  %25 = load float, ptr %12, align 8, !tbaa !17
  %26 = fcmp ugt float %25, 0x4007E04860000000
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 504) #5
  %.not59 = icmp eq i32 %28, 0
  br i1 %.not59, label %30, label %29

29:                                               ; preds = %27
  tail call void @llvm.trap()
  unreachable

30:                                               ; preds = %24, %27
  %31 = tail call ptr @b2GetWorldFromId(i32 %0) #5
  %32 = getelementptr inbounds i8, ptr %31, i64 1799
  %33 = load i8, ptr %32, align 1, !tbaa !18, !range !30, !noundef !31
  %34 = icmp eq i8 %33, 0
  br i1 %34, label %.thread, label %35

35:                                               ; preds = %30
  %36 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 508) #5
  %.not60 = icmp eq i32 %36, 0
  br i1 %.not60, label %38, label %37

37:                                               ; preds = %35
  tail call void @llvm.trap()
  unreachable

38:                                               ; preds = %35
  %.pre = load i8, ptr %32, align 1, !tbaa !18, !range !30
  %39 = trunc nuw i8 %.pre to i1
  br i1 %39, label %112, label %.thread

.thread:                                          ; preds = %30, %38
  %40 = load i64, ptr %1, align 8
  %41 = tail call ptr @b2GetBodyFullId(ptr noundef nonnull %31, i64 %40) #5
  %42 = getelementptr inbounds i8, ptr %1, i64 8
  %43 = load i64, ptr %42, align 8
  %44 = tail call ptr @b2GetBodyFullId(ptr noundef nonnull %31, i64 %43) #5
  %45 = getelementptr inbounds i8, ptr %1, i64 80
  %46 = load ptr, ptr %45, align 8, !tbaa !32
  %47 = getelementptr inbounds i8, ptr %1, i64 72
  %48 = load float, ptr %47, align 8, !tbaa !33
  %49 = getelementptr inbounds i8, ptr %1, i64 76
  %50 = load i8, ptr %49, align 4, !tbaa !34, !range !30, !noundef !31
  %51 = trunc nuw i8 %50 to i1
  %52 = tail call { ptr, ptr } @b2CreateJoint(ptr noundef nonnull %31, ptr noundef %41, ptr noundef %44, ptr noundef %46, float noundef %48, i32 noundef 5, i1 noundef zeroext %51)
  %53 = extractvalue { ptr, ptr } %52, 0
  %54 = extractvalue { ptr, ptr } %52, 1
  %55 = getelementptr inbounds i8, ptr %54, i64 12
  store i32 5, ptr %55, align 4, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %54, i64 16
  %57 = getelementptr inbounds i8, ptr %1, i64 16
  %58 = load i64, ptr %57, align 8
  store i64 %58, ptr %56, align 4
  %59 = getelementptr inbounds i8, ptr %54, i64 24
  %60 = getelementptr inbounds i8, ptr %1, i64 24
  %61 = load i64, ptr %60, align 8
  store i64 %61, ptr %59, align 4
  %62 = getelementptr inbounds i8, ptr %54, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(108) %62, i8 0, i64 108, i1 false)
  %63 = getelementptr inbounds i8, ptr %1, i64 32
  %64 = load float, ptr %63, align 8, !tbaa !37
  %65 = tail call float @b2ClampFloat(float noundef %64, float noundef 0xC00921FB60000000, float noundef 0x400921FB60000000)
  %66 = getelementptr inbounds i8, ptr %54, i64 88
  store float %65, ptr %66, align 4, !tbaa !38
  %67 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %67, ptr %62, align 4
  %68 = getelementptr inbounds i8, ptr %54, i64 136
  store float 0.000000e+00, ptr %68, align 4, !tbaa !38
  %69 = getelementptr inbounds i8, ptr %54, i64 56
  %70 = getelementptr inbounds i8, ptr %1, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %69, i8 0, i64 16, i1 false)
  %71 = load float, ptr %70, align 8, !tbaa !39
  %72 = getelementptr inbounds i8, ptr %54, i64 72
  store float %71, ptr %72, align 4, !tbaa !38
  %73 = getelementptr inbounds i8, ptr %1, i64 44
  %74 = load float, ptr %73, align 4, !tbaa !40
  %75 = getelementptr inbounds i8, ptr %54, i64 76
  store float %74, ptr %75, align 4, !tbaa !38
  %76 = load float, ptr %10, align 4, !tbaa !16
  %77 = getelementptr inbounds i8, ptr %54, i64 92
  store float %76, ptr %77, align 4, !tbaa !38
  %78 = load float, ptr %12, align 8, !tbaa !17
  %79 = getelementptr inbounds i8, ptr %54, i64 96
  store float %78, ptr %79, align 4, !tbaa !38
  %80 = getelementptr inbounds i8, ptr %1, i64 64
  %81 = load float, ptr %80, align 8, !tbaa !41
  %82 = getelementptr inbounds i8, ptr %54, i64 80
  store float %81, ptr %82, align 4, !tbaa !38
  %83 = getelementptr inbounds i8, ptr %1, i64 68
  %84 = load float, ptr %83, align 4, !tbaa !42
  %85 = getelementptr inbounds i8, ptr %54, i64 84
  store float %84, ptr %85, align 4, !tbaa !38
  %86 = getelementptr inbounds i8, ptr %1, i64 36
  %87 = load i8, ptr %86, align 4, !tbaa !43, !range !30, !noundef !31
  %88 = getelementptr inbounds i8, ptr %54, i64 152
  store i8 %87, ptr %88, align 4, !tbaa !38
  %89 = getelementptr inbounds i8, ptr %1, i64 48
  %90 = load i8, ptr %89, align 8, !tbaa !44, !range !30, !noundef !31
  %91 = getelementptr inbounds i8, ptr %54, i64 154
  store i8 %90, ptr %91, align 2, !tbaa !38
  %92 = getelementptr inbounds i8, ptr %1, i64 60
  %93 = load i8, ptr %92, align 4, !tbaa !45, !range !30, !noundef !31
  %94 = getelementptr inbounds i8, ptr %54, i64 153
  store i8 %93, ptr %94, align 1, !tbaa !38
  %95 = load i8, ptr %49, align 4, !tbaa !34, !range !30, !noundef !31
  %96 = icmp eq i8 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %.thread
  tail call void @b2DestroyContactsBetweenBodies(ptr noundef nonnull %31, ptr noundef %41, ptr noundef %44)
  br label %98

98:                                               ; preds = %97, %.thread
  %99 = load i32, ptr %54, align 4, !tbaa !46
  %100 = add nsw i32 %99, 1
  %101 = getelementptr inbounds i8, ptr %31, i64 1796
  %102 = load i16, ptr %101, align 4, !tbaa !47
  %103 = getelementptr inbounds i8, ptr %53, i64 68
  %104 = load i16, ptr %103, align 4, !tbaa !48
  %105 = zext i16 %104 to i64
  %106 = shl nuw i64 %105, 48
  %107 = zext i16 %102 to i64
  %108 = shl nuw nsw i64 %107, 32
  %109 = zext i32 %100 to i64
  %110 = or disjoint i64 %108, %109
  %111 = or disjoint i64 %110, %106
  br label %112

112:                                              ; preds = %38, %98
  %.sroa.056.0.insert.insert = phi i64 [ %111, %98 ], [ 0, %38 ]
  ret i64 %.sroa.056.0.insert.insert
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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"="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 = { 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 = { 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, !8, i64 88}
!6 = !{!"b2RevoluteJointDef", !7, i64 0, !7, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !14, i64 36, !13, i64 40, !13, i64 44, !14, i64 48, !13, i64 52, !13, i64 56, !14, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !14, i64 76, !15, i64 80, !8, i64 88}
!7 = !{!"b2BodyId", !8, i64 0, !11, i64 4, !11, i64 6}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"short", !9, i64 0}
!12 = !{!"b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !9, i64 0}
!14 = !{!"_Bool", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!6, !13, i64 52}
!17 = !{!6, !13, i64 56}
!18 = !{!19, !14, i64 1799}
!19 = !{!"b2World", !20, i64 0, !22, i64 40, !25, i64 336, !26, i64 1008, !21, i64 1032, !26, i64 1048, !21, i64 1072, !26, i64 1088, !21, i64 1112, !26, i64 1128, !21, i64 1152, !26, i64 1168, !21, i64 1192, !26, i64 1208, !26, i64 1232, !21, i64 1256, !21, i64 1272, !21, i64 1288, !21, i64 1304, !21, i64 1320, !21, i64 1336, !21, i64 1352, !21, i64 1368, !9, i64 1384, !9, i64 1416, !8, i64 1448, !21, i64 1456, !27, i64 1472, !27, i64 1488, !27, i64 1504, !27, i64 1520, !28, i64 1536, !8, i64 1544, !12, i64 1548, !13, i64 1556, !13, i64 1560, !13, i64 1564, !13, i64 1568, !13, i64 1572, !13, i64 1576, !13, i64 1580, !13, i64 1584, !15, i64 1592, !15, i64 1600, !11, i64 1608, !29, i64 1612, !15, i64 1704, !15, i64 1712, !15, i64 1720, !15, i64 1728, !8, i64 1736, !15, i64 1744, !15, i64 1752, !15, i64 1760, !15, i64 1768, !15, i64 1776, !13, i64 1784, !8, i64 1788, !8, i64 1792, !11, i64 1796, !14, i64 1798, !14, i64 1799, !14, i64 1800, !14, i64 1801, !14, i64 1802, !14, i64 1803}
!20 = !{!"b2ArenaAllocator", !15, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !21, i64 24}
!21 = !{!"", !15, i64 0, !8, i64 8, !8, i64 12}
!22 = !{!"b2BroadPhase", !9, i64 0, !8, i64 216, !23, i64 224, !21, i64 240, !15, i64 256, !15, i64 264, !8, i64 272, !24, i64 276, !23, i64 280}
!23 = !{!"b2HashSet", !15, i64 0, !8, i64 8, !8, i64 12}
!24 = !{!"b2AtomicInt", !8, i64 0}
!25 = !{!"b2ConstraintGraph", !9, i64 0}
!26 = !{!"b2IdPool", !21, i64 0, !8, i64 16}
!27 = !{!"b2BitSet", !15, i64 0, !8, i64 8, !8, i64 12}
!28 = !{!"long", !9, i64 0}
!29 = !{!"b2Profile", !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, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!6, !15, i64 80}
!33 = !{!6, !13, i64 72}
!34 = !{!6, !14, i64 76}
!35 = !{!36, !8, i64 12}
!36 = !{!"b2JointSim", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12, !12, i64 16, !12, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !9, i64 48}
!37 = !{!6, !13, i64 32}
!38 = !{!9, !9, i64 0}
!39 = !{!6, !13, i64 40}
!40 = !{!6, !13, i64 44}
!41 = !{!6, !13, i64 64}
!42 = !{!6, !13, i64 68}
!43 = !{!6, !14, i64 36}
!44 = !{!6, !14, i64 48}
!45 = !{!6, !14, i64 60}
!46 = !{!36, !8, i64 0}
!47 = !{!19, !11, i64 1796}
!48 = !{!49, !11, i64 68}
!49 = !{!"b2Joint", !15, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !9, i64 20, !8, i64 44, !8, i64 48, !8, i64 52, !8, i64 56, !13, i64 60, !8, i64 64, !11, i64 68, !14, i64 70, !14, i64 71}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass