; LLVM IR from mtsamis/box2d-optimized :: src/dynamics/b2_gear_joint.ll (ZN11b2GearJointC2EPK14b2GearJointDef)

; 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.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Vec2 = type { float, float }
%struct.b2Rot = type { float, float }
%class.b2GearJoint = type { %class.b2Joint, ptr, ptr, i32, i32, ptr, ptr, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float }
%class.b2Joint = type { ptr, i32, ptr, ptr, %struct.b2JointEdge, %struct.b2JointEdge, ptr, ptr, i32, i8, i8, %struct.b2JointUserData }
%struct.b2JointEdge = type { ptr, ptr, ptr, ptr }
%struct.b2JointUserData = type { i64 }
%struct.b2GearJointDef = type <{ %struct.b2JointDef.base, [7 x i8], ptr, ptr, float, [4 x i8] }>
%struct.b2JointDef.base = type <{ i32, [4 x i8], %struct.b2JointUserData, ptr, ptr, i8 }>
%class.b2Body = type { i32, i16, i32, %struct.b2Transform, %struct.b2Transform, %struct.b2Sweep, %struct.b2Vec2, float, %struct.b2Vec2, float, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, float, float, float, float, float, float, float, float, %struct.b2BodyUserData }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2BodyUserData = type { i64 }
%class.b2RevoluteJoint = type { %class.b2Joint, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, i8, float, float, i8, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %struct.b2Mat22, float, float }
%struct.b2Mat22 = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.b2PrismaticJoint = type <{ %class.b2Joint, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, %struct.b2Vec2, float, float, float, float, float, float, float, i8, i8, [2 x i8], i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %struct.b2Mat22, float, float, [4 x i8] }>

@_ZTV11b2GearJoint = external dso_local unnamed_addr constant { [14 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [58 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11b2GearJointC2EPK14b2GearJointDef(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %struct.b2Transform, align 4
  %10 = alloca float, align 4
  %11 = alloca %struct.b2Transform, align 4
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Vec2, align 4
  %18 = alloca %struct.b2Vec2, align 4
  %19 = alloca %struct.b2Vec2, align 4
  %20 = alloca %struct.b2Vec2, align 4
  %21 = alloca %struct.b2Transform, align 4
  %22 = alloca float, align 4
  %23 = alloca %struct.b2Transform, align 4
  %24 = alloca float, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %struct.b2Vec2, align 4
  %28 = alloca %struct.b2Vec2, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca %struct.b2Vec2, align 4
  %31 = alloca %struct.b2Vec2, align 4
  %32 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7b2JointC2EPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(128) %33, ptr noundef %34)
  store ptr getelementptr inbounds inrange(-16, 96) ({ [14 x ptr] }, ptr @_ZTV11b2GearJoint, i32 0, i32 0, i32 2), ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 7
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %35)
          to label %36 unwind label %88

36:                                               ; preds = %2
  %37 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 8
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %37)
          to label %38 unwind label %88

38:                                               ; preds = %36
  %39 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 9
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %39)
          to label %40 unwind label %88

40:                                               ; preds = %38
  %41 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 10
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %41)
          to label %42 unwind label %88

42:                                               ; preds = %40
  %43 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 11
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %43)
          to label %44 unwind label %88

44:                                               ; preds = %42
  %45 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 12
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %45)
          to label %46 unwind label %88

46:                                               ; preds = %44
  %47 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 22
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %47)
          to label %48 unwind label %88

48:                                               ; preds = %46
  %49 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 23
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %49)
          to label %50 unwind label %88

50:                                               ; preds = %48
  %51 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 24
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %51)
          to label %52 unwind label %88

52:                                               ; preds = %50
  %53 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 25
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %53)
          to label %54 unwind label %88

54:                                               ; preds = %52
  %55 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 34
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %55)
          to label %56 unwind label %88

56:                                               ; preds = %54
  %57 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 35
  invoke void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %57)
          to label %58 unwind label %88

58:                                               ; preds = %56
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.b2GearJointDef, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 1
  store ptr %61, ptr %62, align 8, !tbaa !19
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.b2GearJointDef, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !25
  %66 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 2
  store ptr %65, ptr %66, align 8, !tbaa !26
  %67 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !19
  %69 = invoke noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128) %68)
          to label %70 unwind label %88

70:                                               ; preds = %58
  %71 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 3
  store i32 %69, ptr %71, align 8, !tbaa !27
  %72 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !26
  %74 = invoke noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128) %73)
          to label %75 unwind label %88

75:                                               ; preds = %70
  %76 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 4
  store i32 %74, ptr %76, align 4, !tbaa !28
  %77 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !27
  %79 = icmp eq i32 %78, 1
  br i1 %79, label %84, label %80

80:                                               ; preds = %75
  %81 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 3
  %82 = load i32, ptr %81, align 8, !tbaa !27
  %83 = icmp eq i32 %82, 2
  br label %84

84:                                               ; preds = %80, %75
  %85 = phi i1 [ true, %75 ], [ %83, %80 ]
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  br label %93

87:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 57, ptr noundef @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

88:                                               ; preds = %70, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %2
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %5, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %6, align 4
  br label %359

92:                                               ; No predecessors!
  br label %93

93:                                               ; preds = %92, %86
  %94 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 4
  %95 = load i32, ptr %94, align 4, !tbaa !28
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %101, label %97

97:                                               ; preds = %93
  %98 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 4
  %99 = load i32, ptr %98, align 4, !tbaa !28
  %100 = icmp eq i32 %99, 2
  br label %101

101:                                              ; preds = %97, %93
  %102 = phi i1 [ true, %93 ], [ %100, %97 ]
  br i1 %102, label %103, label %104

103:                                              ; preds = %101
  br label %106

104:                                              ; preds = %101
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 58, ptr noundef @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

105:                                              ; No predecessors!
  br label %106

106:                                              ; preds = %105, %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  %107 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !19
  %109 = invoke noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128) %108)
          to label %110 unwind label %124

110:                                              ; preds = %106
  %111 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 5
  store ptr %109, ptr %111, align 8, !tbaa !29
  %112 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = invoke noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128) %113)
          to label %115 unwind label %124

115:                                              ; preds = %110
  %116 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 6
  store ptr %114, ptr %116, align 8, !tbaa !30
  %117 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 6
  %118 = load ptr, ptr %117, align 8, !tbaa !30
  %119 = getelementptr inbounds %class.b2Body, ptr %118, i32 0, i32 0
  %120 = load i32, ptr %119, align 8, !tbaa !31
  %121 = icmp eq i32 %120, 2
  br i1 %121, label %122, label %123

122:                                              ; preds = %115
  br label %129

123:                                              ; preds = %115
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

124:                                              ; preds = %110, %106
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %5, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %6, align 4
  br label %358

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128, %122
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #10
  %130 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 6
  %131 = load ptr, ptr %130, align 8, !tbaa !30
  %132 = getelementptr inbounds %class.b2Body, ptr %131, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %132, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %133 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !30
  %135 = getelementptr inbounds %class.b2Body, ptr %134, i32 0, i32 5
  %136 = getelementptr inbounds %struct.b2Sweep, ptr %135, i32 0, i32 4
  %137 = load float, ptr %136, align 4, !tbaa !41
  store float %137, ptr %10, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #10
  %138 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !29
  %140 = getelementptr inbounds %class.b2Body, ptr %139, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %140, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %141 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 5
  %142 = load ptr, ptr %141, align 8, !tbaa !29
  %143 = getelementptr inbounds %class.b2Body, ptr %142, i32 0, i32 5
  %144 = getelementptr inbounds %struct.b2Sweep, ptr %143, i32 0, i32 4
  %145 = load float, ptr %144, align 4, !tbaa !41
  store float %145, ptr %12, align 4, !tbaa !40
  %146 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 3
  %147 = load i32, ptr %146, align 8, !tbaa !27
  %148 = icmp eq i32 %147, 1
  br i1 %148, label %149, label %175

149:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.b2GearJointDef, ptr %150, i32 0, i32 2
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  store ptr %152, ptr %13, align 8, !tbaa !5
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = getelementptr inbounds %class.b2RevoluteJoint, ptr %153, i32 0, i32 1
  %155 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %155, ptr align 8 %154, i64 8, i1 false), !tbaa.struct !42
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.b2RevoluteJoint, ptr %156, i32 0, i32 2
  %158 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %158, ptr align 8 %157, i64 8, i1 false), !tbaa.struct !42
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds %class.b2RevoluteJoint, ptr %159, i32 0, i32 11
  %161 = load float, ptr %160, align 4, !tbaa !43
  %162 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 13
  store float %161, ptr %162, align 8, !tbaa !46
  %163 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 11
  invoke void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %163)
          to label %164 unwind label %171

164:                                              ; preds = %149
  %165 = load float, ptr %10, align 4, !tbaa !40
  %166 = load float, ptr %12, align 4, !tbaa !40
  %167 = fsub float %165, %166
  %168 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 13
  %169 = load float, ptr %168, align 8, !tbaa !46
  %170 = fsub float %167, %169
  store float %170, ptr %7, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %225

171:                                              ; preds = %149
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %5, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %357

175:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.b2GearJointDef, ptr %176, i32 0, i32 2
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  store ptr %178, ptr %14, align 8, !tbaa !5
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = getelementptr inbounds %class.b2PrismaticJoint, ptr %179, i32 0, i32 1
  %181 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %181, ptr align 8 %180, i64 8, i1 false), !tbaa.struct !42
  %182 = load ptr, ptr %14, align 8, !tbaa !5
  %183 = getelementptr inbounds %class.b2PrismaticJoint, ptr %182, i32 0, i32 2
  %184 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %184, ptr align 8 %183, i64 8, i1 false), !tbaa.struct !42
  %185 = load ptr, ptr %14, align 8, !tbaa !5
  %186 = getelementptr inbounds %class.b2PrismaticJoint, ptr %185, i32 0, i32 5
  %187 = load float, ptr %186, align 8, !tbaa !47
  %188 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 13
  store float %187, ptr %188, align 8, !tbaa !46
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = getelementptr inbounds %class.b2PrismaticJoint, ptr %189, i32 0, i32 3
  %191 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %191, ptr align 8 %190, i64 8, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %192 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 8 %192, i64 8, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %193 = getelementptr inbounds %struct.b2Transform, ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %194 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 1
  %195 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 7
  %196 = invoke <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %194, ptr noundef nonnull align 4 dereferenceable(8) %195)
          to label %197 unwind label %211

197:                                              ; preds = %175
  store <2 x float> %196, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %198 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %199 = getelementptr inbounds %struct.b2Transform, ptr %11, i32 0, i32 0
  %200 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %198, ptr noundef nonnull align 4 dereferenceable(8) %199)
          to label %201 unwind label %215

201:                                              ; preds = %197
  store <2 x float> %200, ptr %19, align 4
  %202 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %203 unwind label %215

203:                                              ; preds = %201
  store <2 x float> %202, ptr %17, align 4
  %204 = invoke <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %193, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %205 unwind label %215

205:                                              ; preds = %203
  store <2 x float> %204, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %206 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %207 unwind label %220

207:                                              ; preds = %205
  store <2 x float> %206, ptr %20, align 4
  %208 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 11
  %209 = invoke noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %208)
          to label %210 unwind label %220

210:                                              ; preds = %207
  store float %209, ptr %7, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %225

211:                                              ; preds = %175
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %5, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %6, align 4
  br label %219

215:                                              ; preds = %203, %201, %197
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %5, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %219

219:                                              ; preds = %215, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %224

220:                                              ; preds = %207, %205
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %5, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %224

224:                                              ; preds = %220, %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %357

225:                                              ; preds = %210, %164
  %226 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 2
  %227 = load ptr, ptr %226, align 8, !tbaa !26
  %228 = invoke noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128) %227)
          to label %229 unwind label %243

229:                                              ; preds = %225
  %230 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 6
  store ptr %228, ptr %230, align 8, !tbaa !49
  %231 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !26
  %233 = invoke noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128) %232)
          to label %234 unwind label %243

234:                                              ; preds = %229
  %235 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 7
  store ptr %233, ptr %235, align 8, !tbaa !50
  %236 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 7
  %237 = load ptr, ptr %236, align 8, !tbaa !50
  %238 = getelementptr inbounds %class.b2Body, ptr %237, i32 0, i32 0
  %239 = load i32, ptr %238, align 8, !tbaa !31
  %240 = icmp eq i32 %239, 2
  br i1 %240, label %241, label %242

241:                                              ; preds = %234
  br label %248

242:                                              ; preds = %234
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

243:                                              ; preds = %229, %225
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %5, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %6, align 4
  br label %357

247:                                              ; No predecessors!
  br label %248

248:                                              ; preds = %247, %241
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #10
  %249 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 7
  %250 = load ptr, ptr %249, align 8, !tbaa !50
  %251 = getelementptr inbounds %class.b2Body, ptr %250, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %251, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %252 = getelementptr inbounds %class.b2Joint, ptr %33, i32 0, i32 7
  %253 = load ptr, ptr %252, align 8, !tbaa !50
  %254 = getelementptr inbounds %class.b2Body, ptr %253, i32 0, i32 5
  %255 = getelementptr inbounds %struct.b2Sweep, ptr %254, i32 0, i32 4
  %256 = load float, ptr %255, align 4, !tbaa !41
  store float %256, ptr %22, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #10
  %257 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 6
  %258 = load ptr, ptr %257, align 8, !tbaa !49
  %259 = getelementptr inbounds %class.b2Body, ptr %258, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %259, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  %260 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 6
  %261 = load ptr, ptr %260, align 8, !tbaa !49
  %262 = getelementptr inbounds %class.b2Body, ptr %261, i32 0, i32 5
  %263 = getelementptr inbounds %struct.b2Sweep, ptr %262, i32 0, i32 4
  %264 = load float, ptr %263, align 4, !tbaa !41
  store float %264, ptr %24, align 4, !tbaa !40
  %265 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 4
  %266 = load i32, ptr %265, align 4, !tbaa !28
  %267 = icmp eq i32 %266, 1
  br i1 %267, label %268, label %294

268:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %269 = load ptr, ptr %4, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.b2GearJointDef, ptr %269, i32 0, i32 3
  %271 = load ptr, ptr %270, align 8, !tbaa !25
  store ptr %271, ptr %25, align 8, !tbaa !5
  %272 = load ptr, ptr %25, align 8, !tbaa !5
  %273 = getelementptr inbounds %class.b2RevoluteJoint, ptr %272, i32 0, i32 1
  %274 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %274, ptr align 8 %273, i64 8, i1 false), !tbaa.struct !42
  %275 = load ptr, ptr %25, align 8, !tbaa !5
  %276 = getelementptr inbounds %class.b2RevoluteJoint, ptr %275, i32 0, i32 2
  %277 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %277, ptr align 8 %276, i64 8, i1 false), !tbaa.struct !42
  %278 = load ptr, ptr %25, align 8, !tbaa !5
  %279 = getelementptr inbounds %class.b2RevoluteJoint, ptr %278, i32 0, i32 11
  %280 = load float, ptr %279, align 4, !tbaa !43
  %281 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 14
  store float %280, ptr %281, align 4, !tbaa !51
  %282 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 12
  invoke void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %282)
          to label %283 unwind label %290

283:                                              ; preds = %268
  %284 = load float, ptr %22, align 4, !tbaa !40
  %285 = load float, ptr %24, align 4, !tbaa !40
  %286 = fsub float %284, %285
  %287 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 14
  %288 = load float, ptr %287, align 4, !tbaa !51
  %289 = fsub float %286, %288
  store float %289, ptr %8, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %344

290:                                              ; preds = %268
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %5, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %356

294:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %295 = load ptr, ptr %4, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.b2GearJointDef, ptr %295, i32 0, i32 3
  %297 = load ptr, ptr %296, align 8, !tbaa !25
  store ptr %297, ptr %26, align 8, !tbaa !5
  %298 = load ptr, ptr %26, align 8, !tbaa !5
  %299 = getelementptr inbounds %class.b2PrismaticJoint, ptr %298, i32 0, i32 1
  %300 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %300, ptr align 8 %299, i64 8, i1 false), !tbaa.struct !42
  %301 = load ptr, ptr %26, align 8, !tbaa !5
  %302 = getelementptr inbounds %class.b2PrismaticJoint, ptr %301, i32 0, i32 2
  %303 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %303, ptr align 8 %302, i64 8, i1 false), !tbaa.struct !42
  %304 = load ptr, ptr %26, align 8, !tbaa !5
  %305 = getelementptr inbounds %class.b2PrismaticJoint, ptr %304, i32 0, i32 5
  %306 = load float, ptr %305, align 8, !tbaa !47
  %307 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 14
  store float %306, ptr %307, align 4, !tbaa !51
  %308 = load ptr, ptr %26, align 8, !tbaa !5
  %309 = getelementptr inbounds %class.b2PrismaticJoint, ptr %308, i32 0, i32 3
  %310 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %310, ptr align 8 %309, i64 8, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %311 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 8 %311, i64 8, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %312 = getelementptr inbounds %struct.b2Transform, ptr %23, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %313 = getelementptr inbounds %struct.b2Transform, ptr %21, i32 0, i32 1
  %314 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 8
  %315 = invoke <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %313, ptr noundef nonnull align 4 dereferenceable(8) %314)
          to label %316 unwind label %330

316:                                              ; preds = %294
  store <2 x float> %315, ptr %30, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %317 = getelementptr inbounds %struct.b2Transform, ptr %21, i32 0, i32 0
  %318 = getelementptr inbounds %struct.b2Transform, ptr %23, i32 0, i32 0
  %319 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %317, ptr noundef nonnull align 4 dereferenceable(8) %318)
          to label %320 unwind label %334

320:                                              ; preds = %316
  store <2 x float> %319, ptr %31, align 4
  %321 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %31)
          to label %322 unwind label %334

322:                                              ; preds = %320
  store <2 x float> %321, ptr %29, align 4
  %323 = invoke <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %312, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %324 unwind label %334

324:                                              ; preds = %322
  store <2 x float> %323, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %325 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %326 unwind label %339

326:                                              ; preds = %324
  store <2 x float> %325, ptr %32, align 4
  %327 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 12
  %328 = invoke noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %32, ptr noundef nonnull align 4 dereferenceable(8) %327)
          to label %329 unwind label %339

329:                                              ; preds = %326
  store float %328, ptr %8, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br label %344

330:                                              ; preds = %294
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %5, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %6, align 4
  br label %338

334:                                              ; preds = %322, %320, %316
  %335 = landingpad { ptr, i32 }
          cleanup
  %336 = extractvalue { ptr, i32 } %335, 0
  store ptr %336, ptr %5, align 8
  %337 = extractvalue { ptr, i32 } %335, 1
  store i32 %337, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %338

338:                                              ; preds = %334, %330
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  br label %343

339:                                              ; preds = %326, %324
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %5, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %343

343:                                              ; preds = %339, %338
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br label %356

344:                                              ; preds = %329, %283
  %345 = load ptr, ptr %4, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.b2GearJointDef, ptr %345, i32 0, i32 4
  %347 = load float, ptr %346, align 8, !tbaa !52
  %348 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 16
  store float %347, ptr %348, align 4, !tbaa !53
  %349 = load float, ptr %7, align 4, !tbaa !40
  %350 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 16
  %351 = load float, ptr %350, align 4, !tbaa !53
  %352 = load float, ptr %8, align 4, !tbaa !40
  %353 = call float @llvm.fmuladd.f32(float %351, float %352, float %349)
  %354 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 15
  store float %353, ptr %354, align 8, !tbaa !54
  %355 = getelementptr inbounds %class.b2GearJoint, ptr %33, i32 0, i32 17
  store float 0.000000e+00, ptr %355, align 8, !tbaa !55
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  ret void

356:                                              ; preds = %343, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #10
  br label %357

357:                                              ; preds = %356, %243, %224, %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #10
  br label %358

358:                                              ; preds = %357, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  br label %359

359:                                              ; preds = %358, %88
  call void @_ZN7b2JointD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %33) #10
  br label %360

360:                                              ; preds = %359
  %361 = load ptr, ptr %5, align 8
  %362 = load i32, ptr %6, align 4
  %363 = insertvalue { ptr, i32 } poison, ptr %361, 0
  %364 = insertvalue { ptr, i32 } %363, i32 %362, 1
  resume { ptr, i32 } %364
}

declare void @_ZN7b2JointC2EPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7b2JointD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

attributes #0 = { mustprogress 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 = { "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 = { mustprogress 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 = { inlinehint mustprogress 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 = { noreturn nounwind "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { inlinehint mustprogress 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTS14b2GearJointDef", !13, i64 0, !6, i64 40, !6, i64 48, !18, i64 56}
!13 = !{!"_ZTS10b2JointDef", !14, i64 0, !15, i64 8, !6, i64 16, !6, i64 24, !17, i64 32}
!14 = !{!"_ZTS11b2JointType", !7, i64 0}
!15 = !{!"_ZTS15b2JointUserData", !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !6, i64 128}
!20 = !{!"_ZTS11b2GearJoint", !21, i64 0, !6, i64 128, !6, i64 136, !14, i64 144, !14, i64 148, !6, i64 152, !6, i64 160, !24, i64 168, !24, i64 176, !24, i64 184, !24, i64 192, !24, i64 200, !24, i64 208, !18, i64 216, !18, i64 220, !18, i64 224, !18, i64 228, !18, i64 232, !23, i64 236, !23, i64 240, !23, i64 244, !23, i64 248, !24, i64 252, !24, i64 260, !24, i64 268, !24, i64 276, !18, i64 284, !18, i64 288, !18, i64 292, !18, i64 296, !18, i64 300, !18, i64 304, !18, i64 308, !18, i64 312, !24, i64 316, !24, i64 324, !18, i64 332, !18, i64 336, !18, i64 340, !18, i64 344, !18, i64 348}
!21 = !{!"_ZTS7b2Joint", !14, i64 8, !6, i64 16, !6, i64 24, !22, i64 32, !22, i64 64, !6, i64 96, !6, i64 104, !23, i64 112, !17, i64 116, !17, i64 117, !15, i64 120}
!22 = !{!"_ZTS11b2JointEdge", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"int", !7, i64 0}
!24 = !{!"_ZTS6b2Vec2", !18, i64 0, !18, i64 4}
!25 = !{!12, !6, i64 48}
!26 = !{!20, !6, i64 136}
!27 = !{!20, !14, i64 144}
!28 = !{!20, !14, i64 148}
!29 = !{!20, !6, i64 152}
!30 = !{!21, !6, i64 96}
!31 = !{!32, !33, i64 0}
!32 = !{!"_ZTS6b2Body", !33, i64 0, !34, i64 4, !23, i64 8, !35, i64 12, !35, i64 28, !37, i64 44, !24, i64 80, !18, i64 88, !24, i64 92, !18, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !23, i64 136, !6, i64 144, !6, i64 152, !23, i64 160, !23, i64 164, !18, i64 168, !18, i64 172, !18, i64 176, !18, i64 180, !18, i64 184, !18, i64 188, !18, i64 192, !18, i64 196, !38, i64 200}
!33 = !{!"_ZTS10b2BodyType", !7, i64 0}
!34 = !{!"short", !7, i64 0}
!35 = !{!"_ZTS11b2Transform", !24, i64 0, !36, i64 8}
!36 = !{!"_ZTS5b2Rot", !18, i64 0, !18, i64 4}
!37 = !{!"_ZTS7b2Sweep", !24, i64 0, !24, i64 8, !24, i64 16, !18, i64 24, !18, i64 28, !18, i64 32}
!38 = !{!"_ZTS14b2BodyUserData", !16, i64 0}
!39 = !{i64 0, i64 4, !40, i64 4, i64 4, !40, i64 8, i64 4, !40, i64 12, i64 4, !40}
!40 = !{!18, !18, i64 0}
!41 = !{!32, !18, i64 72}
!42 = !{i64 0, i64 4, !40, i64 4, i64 4, !40}
!43 = !{!44, !18, i64 180}
!44 = !{!"_ZTS15b2RevoluteJoint", !21, i64 0, !24, i64 128, !24, i64 136, !24, i64 144, !18, i64 152, !18, i64 156, !18, i64 160, !17, i64 164, !18, i64 168, !18, i64 172, !17, i64 176, !18, i64 180, !18, i64 184, !18, i64 188, !23, i64 192, !23, i64 196, !24, i64 200, !24, i64 208, !24, i64 216, !24, i64 224, !18, i64 232, !18, i64 236, !18, i64 240, !18, i64 244, !45, i64 248, !18, i64 264, !18, i64 268}
!45 = !{!"_ZTS7b2Mat22", !24, i64 0, !24, i64 8}
!46 = !{!20, !18, i64 216}
!47 = !{!48, !18, i64 160}
!48 = !{!"_ZTS16b2PrismaticJoint", !21, i64 0, !24, i64 128, !24, i64 136, !24, i64 144, !24, i64 152, !18, i64 160, !24, i64 164, !18, i64 172, !18, i64 176, !18, i64 180, !18, i64 184, !18, i64 188, !18, i64 192, !18, i64 196, !17, i64 200, !17, i64 201, !23, i64 204, !23, i64 208, !24, i64 212, !24, i64 220, !18, i64 228, !18, i64 232, !18, i64 236, !18, i64 240, !24, i64 244, !24, i64 252, !18, i64 260, !18, i64 264, !18, i64 268, !18, i64 272, !45, i64 276, !18, i64 292, !18, i64 296}
!49 = !{!20, !6, i64 160}
!50 = !{!21, !6, i64 104}
!51 = !{!20, !18, i64 220}
!52 = !{!12, !18, i64 56}
!53 = !{!20, !18, i64 228}
!54 = !{!20, !18, i64 224}
!55 = !{!20, !18, i64 232}


; 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.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Vec2 = type { float, float }
%struct.b2Rot = type { float, float }

@_ZTV11b2GearJoint = external dso_local unnamed_addr constant { [14 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [58 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11b2GearJointC2EPK14b2GearJointDef(ptr noundef nonnull align 8 dereferenceable(352) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.b2Transform, align 4
  %4 = alloca %struct.b2Transform, align 4
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca %struct.b2Vec2, align 8
  %11 = alloca %struct.b2Transform, align 4
  %12 = alloca %struct.b2Transform, align 4
  %13 = alloca %struct.b2Vec2, align 8
  %14 = alloca %struct.b2Vec2, align 8
  %15 = alloca %struct.b2Vec2, align 8
  %16 = alloca %struct.b2Vec2, align 8
  %17 = alloca %struct.b2Vec2, align 8
  %18 = alloca %struct.b2Vec2, align 8
  tail call void @_ZN7b2JointC2EPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1)
  store ptr getelementptr inbounds inrange(-16, 96) (i8, ptr @_ZTV11b2GearJoint, i64 16), ptr %0, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 168
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 184
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 192
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %22)
  %23 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %23)
  %24 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %24)
  %25 = getelementptr inbounds i8, ptr %0, i64 252
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 260
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %26)
  %27 = getelementptr inbounds i8, ptr %0, i64 268
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %27)
  %28 = getelementptr inbounds i8, ptr %0, i64 276
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %28)
  %29 = getelementptr inbounds i8, ptr %0, i64 316
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %29)
  %30 = getelementptr inbounds i8, ptr %0, i64 324
  tail call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %30)
  %31 = getelementptr inbounds i8, ptr %1, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !8
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr %32, ptr %33, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %1, i64 48
  %35 = load ptr, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr %35, ptr %36, align 8, !tbaa !25
  %37 = tail call noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128) %32)
  %38 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 %37, ptr %38, align 8, !tbaa !26
  %39 = load ptr, ptr %36, align 8, !tbaa !25
  %40 = tail call noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128) %39)
  %41 = getelementptr inbounds i8, ptr %0, i64 148
  store i32 %40, ptr %41, align 4, !tbaa !27
  %42 = load i32, ptr %38, align 8, !tbaa !26
  %.off = add i32 %42, -1
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %.critedge, label %43

43:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

.critedge:                                        ; preds = %2
  %.off49 = add i32 %40, -1
  %switch50 = icmp ult i32 %.off49, 2
  br i1 %switch50, label %.critedge2, label %44

44:                                               ; preds = %.critedge
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 58, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

.critedge2:                                       ; preds = %.critedge
  %45 = load ptr, ptr %33, align 8, !tbaa !18
  %46 = tail call noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128) %45)
  %47 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %46, ptr %47, align 8, !tbaa !28
  %48 = load ptr, ptr %33, align 8, !tbaa !18
  %49 = tail call noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128) %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %49, ptr %50, align 8, !tbaa !29
  %51 = load i32, ptr %49, align 8, !tbaa !30
  %52 = icmp eq i32 %51, 2
  br i1 %52, label %54, label %53

53:                                               ; preds = %.critedge2
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

54:                                               ; preds = %.critedge2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #10
  %55 = getelementptr inbounds i8, ptr %49, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(16) %55, i64 16, i1 false), !tbaa.struct !38
  %56 = getelementptr inbounds i8, ptr %49, i64 72
  %57 = load float, ptr %56, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  %58 = load ptr, ptr %47, align 8, !tbaa !28
  %59 = getelementptr inbounds i8, ptr %58, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(16) %59, i64 16, i1 false), !tbaa.struct !38
  %60 = load i32, ptr %38, align 8, !tbaa !26
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %76

62:                                               ; preds = %54
  %63 = getelementptr inbounds i8, ptr %58, i64 72
  %64 = load float, ptr %63, align 4, !tbaa !40
  %65 = load ptr, ptr %31, align 8, !tbaa !8
  %66 = getelementptr inbounds i8, ptr %65, i64 128
  %67 = load i64, ptr %66, align 8
  store i64 %67, ptr %21, align 8
  %68 = getelementptr inbounds i8, ptr %65, i64 136
  %69 = load i64, ptr %68, align 8
  store i64 %69, ptr %19, align 8
  %70 = getelementptr inbounds i8, ptr %65, i64 180
  %71 = load float, ptr %70, align 4, !tbaa !41
  %72 = getelementptr inbounds i8, ptr %0, i64 216
  store float %71, ptr %72, align 8, !tbaa !44
  tail call void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %23)
  %73 = fsub float %57, %64
  %74 = load float, ptr %72, align 8, !tbaa !44
  %75 = fsub float %73, %74
  br label %108

76:                                               ; preds = %54
  %77 = load ptr, ptr %31, align 8, !tbaa !8
  %78 = getelementptr inbounds i8, ptr %77, i64 128
  %79 = load i64, ptr %78, align 8
  store i64 %79, ptr %21, align 8
  %80 = getelementptr inbounds i8, ptr %77, i64 136
  %81 = load i64, ptr %80, align 8
  store i64 %81, ptr %19, align 8
  %82 = getelementptr inbounds i8, ptr %77, i64 160
  %83 = load float, ptr %82, align 8, !tbaa !45
  %84 = getelementptr inbounds i8, ptr %0, i64 216
  store float %83, ptr %84, align 8, !tbaa !44
  %85 = getelementptr inbounds i8, ptr %77, i64 144
  %86 = load i64, ptr %85, align 8
  store i64 %86, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  store i64 %79, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %87 = getelementptr inbounds i8, ptr %4, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %88 = getelementptr inbounds i8, ptr %3, i64 8
  %89 = invoke <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %90 unwind label %100

90:                                               ; preds = %76
  store <2 x float> %89, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %91 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %92 unwind label %102

92:                                               ; preds = %90
  store <2 x float> %91, ptr %9, align 8
  %93 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %94 unwind label %102

94:                                               ; preds = %92
  store <2 x float> %93, ptr %7, align 8
  %95 = invoke <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %87, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %96 unwind label %102

96:                                               ; preds = %94
  store <2 x float> %95, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %97 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %98 unwind label %105

98:                                               ; preds = %96
  store <2 x float> %97, ptr %10, align 8
  %99 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %23)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br label %108

100:                                              ; preds = %76
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %104

102:                                              ; preds = %94, %92, %90
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br label %104

104:                                              ; preds = %102, %100
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br label %107

105:                                              ; preds = %96
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br label %107

107:                                              ; preds = %105, %104
  %.pn42 = phi { ptr, i32 } [ %106, %105 ], [ %.pn, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br label %179

108:                                              ; preds = %98, %62
  %.037 = phi float [ %75, %62 ], [ %99, %98 ]
  %109 = load ptr, ptr %36, align 8, !tbaa !25
  %110 = call noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128) %109)
  %111 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %110, ptr %111, align 8, !tbaa !47
  %112 = load ptr, ptr %36, align 8, !tbaa !25
  %113 = call noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128) %112)
  %114 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %113, ptr %114, align 8, !tbaa !48
  %115 = load i32, ptr %113, align 8, !tbaa !30
  %116 = icmp eq i32 %115, 2
  br i1 %116, label %118, label %117

117:                                              ; preds = %108
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11b2GearJointC2EPK14b2GearJointDef) #9
  unreachable

118:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  %119 = getelementptr inbounds i8, ptr %113, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(16) %119, i64 16, i1 false), !tbaa.struct !38
  %120 = getelementptr inbounds i8, ptr %113, i64 72
  %121 = load float, ptr %120, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  %122 = load ptr, ptr %111, align 8, !tbaa !47
  %123 = getelementptr inbounds i8, ptr %122, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(16) %123, i64 16, i1 false), !tbaa.struct !38
  %124 = load i32, ptr %41, align 4, !tbaa !27
  %125 = icmp eq i32 %124, 1
  br i1 %125, label %126, label %140

126:                                              ; preds = %118
  %127 = getelementptr inbounds i8, ptr %122, i64 72
  %128 = load float, ptr %127, align 4, !tbaa !40
  %129 = load ptr, ptr %34, align 8, !tbaa !24
  %130 = getelementptr inbounds i8, ptr %129, i64 128
  %131 = load i64, ptr %130, align 8
  store i64 %131, ptr %22, align 8
  %132 = getelementptr inbounds i8, ptr %129, i64 136
  %133 = load i64, ptr %132, align 8
  store i64 %133, ptr %20, align 8
  %134 = getelementptr inbounds i8, ptr %129, i64 180
  %135 = load float, ptr %134, align 4, !tbaa !41
  %136 = getelementptr inbounds i8, ptr %0, i64 220
  store float %135, ptr %136, align 4, !tbaa !49
  call void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %24)
  %137 = fsub float %121, %128
  %138 = load float, ptr %136, align 4, !tbaa !49
  %139 = fsub float %137, %138
  br label %172

140:                                              ; preds = %118
  %141 = load ptr, ptr %34, align 8, !tbaa !24
  %142 = getelementptr inbounds i8, ptr %141, i64 128
  %143 = load i64, ptr %142, align 8
  store i64 %143, ptr %22, align 8
  %144 = getelementptr inbounds i8, ptr %141, i64 136
  %145 = load i64, ptr %144, align 8
  store i64 %145, ptr %20, align 8
  %146 = getelementptr inbounds i8, ptr %141, i64 160
  %147 = load float, ptr %146, align 8, !tbaa !45
  %148 = getelementptr inbounds i8, ptr %0, i64 220
  store float %147, ptr %148, align 4, !tbaa !49
  %149 = getelementptr inbounds i8, ptr %141, i64 144
  %150 = load i64, ptr %149, align 8
  store i64 %150, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  store i64 %143, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  %151 = getelementptr inbounds i8, ptr %12, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %152 = getelementptr inbounds i8, ptr %11, i64 8
  %153 = invoke <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %152, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %154 unwind label %164

154:                                              ; preds = %140
  store <2 x float> %153, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %155 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %156 unwind label %166

156:                                              ; preds = %154
  store <2 x float> %155, ptr %17, align 8
  %157 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %158 unwind label %166

158:                                              ; preds = %156
  store <2 x float> %157, ptr %15, align 8
  %159 = invoke <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8) %151, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %160 unwind label %166

160:                                              ; preds = %158
  store <2 x float> %159, ptr %14, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  %161 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %162 unwind label %169

162:                                              ; preds = %160
  store <2 x float> %161, ptr %18, align 8
  %163 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  br label %172

164:                                              ; preds = %140
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %168

166:                                              ; preds = %158, %156, %154
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  br label %168

168:                                              ; preds = %166, %164
  %.pn44 = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  br label %171

169:                                              ; preds = %160
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  br label %171

171:                                              ; preds = %169, %168
  %.pn46 = phi { ptr, i32 } [ %170, %169 ], [ %.pn44, %168 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  br label %179

172:                                              ; preds = %162, %126
  %.038 = phi float [ %139, %126 ], [ %163, %162 ]
  %173 = getelementptr inbounds i8, ptr %1, i64 56
  %174 = load float, ptr %173, align 8, !tbaa !50
  %175 = getelementptr inbounds i8, ptr %0, i64 228
  store float %174, ptr %175, align 4, !tbaa !51
  %176 = call float @llvm.fmuladd.f32(float %174, float %.038, float %.037)
  %177 = getelementptr inbounds i8, ptr %0, i64 224
  store float %176, ptr %177, align 8, !tbaa !52
  %178 = getelementptr inbounds i8, ptr %0, i64 232
  store float 0.000000e+00, ptr %178, align 8, !tbaa !53
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  ret void

179:                                              ; preds = %171, %107
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %171 ], [ %.pn42, %107 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  call void @_ZN7b2JointD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %0) #10
  resume { ptr, i32 } %.pn46.pn
}

declare void @_ZN7b2JointC2EPK10b2JointDef(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7b2Joint7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7b2Joint8GetBodyAEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7b2Joint8GetBodyBEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z6b2MulTRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z5b2MulRK5b2RotRK6b2Vec2(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7b2JointD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

attributes #0 = { mustprogress 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 = { "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 = { mustprogress 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 = { inlinehint mustprogress 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { inlinehint mustprogress 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { noreturn nounwind }
attributes #10 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 40}
!9 = !{!"_ZTS14b2GearJointDef", !10, i64 0, !15, i64 40, !15, i64 48, !17, i64 56}
!10 = !{!"_ZTS10b2JointDef", !11, i64 0, !13, i64 8, !15, i64 16, !15, i64 24, !16, i64 32}
!11 = !{!"_ZTS11b2JointType", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"_ZTS15b2JointUserData", !14, i64 0}
!14 = !{!"long", !12, i64 0}
!15 = !{!"any pointer", !12, i64 0}
!16 = !{!"bool", !12, i64 0}
!17 = !{!"float", !12, i64 0}
!18 = !{!19, !15, i64 128}
!19 = !{!"_ZTS11b2GearJoint", !20, i64 0, !15, i64 128, !15, i64 136, !11, i64 144, !11, i64 148, !15, i64 152, !15, i64 160, !23, i64 168, !23, i64 176, !23, i64 184, !23, i64 192, !23, i64 200, !23, i64 208, !17, i64 216, !17, i64 220, !17, i64 224, !17, i64 228, !17, i64 232, !22, i64 236, !22, i64 240, !22, i64 244, !22, i64 248, !23, i64 252, !23, i64 260, !23, i64 268, !23, i64 276, !17, i64 284, !17, i64 288, !17, i64 292, !17, i64 296, !17, i64 300, !17, i64 304, !17, i64 308, !17, i64 312, !23, i64 316, !23, i64 324, !17, i64 332, !17, i64 336, !17, i64 340, !17, i64 344, !17, i64 348}
!20 = !{!"_ZTS7b2Joint", !11, i64 8, !15, i64 16, !15, i64 24, !21, i64 32, !21, i64 64, !15, i64 96, !15, i64 104, !22, i64 112, !16, i64 116, !16, i64 117, !13, i64 120}
!21 = !{!"_ZTS11b2JointEdge", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!22 = !{!"int", !12, i64 0}
!23 = !{!"_ZTS6b2Vec2", !17, i64 0, !17, i64 4}
!24 = !{!9, !15, i64 48}
!25 = !{!19, !15, i64 136}
!26 = !{!19, !11, i64 144}
!27 = !{!19, !11, i64 148}
!28 = !{!19, !15, i64 152}
!29 = !{!20, !15, i64 96}
!30 = !{!31, !32, i64 0}
!31 = !{!"_ZTS6b2Body", !32, i64 0, !33, i64 4, !22, i64 8, !34, i64 12, !34, i64 28, !36, i64 44, !23, i64 80, !17, i64 88, !23, i64 92, !17, i64 100, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !22, i64 136, !15, i64 144, !15, i64 152, !22, i64 160, !22, i64 164, !17, i64 168, !17, i64 172, !17, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !17, i64 192, !17, i64 196, !37, i64 200}
!32 = !{!"_ZTS10b2BodyType", !12, i64 0}
!33 = !{!"short", !12, i64 0}
!34 = !{!"_ZTS11b2Transform", !23, i64 0, !35, i64 8}
!35 = !{!"_ZTS5b2Rot", !17, i64 0, !17, i64 4}
!36 = !{!"_ZTS7b2Sweep", !23, i64 0, !23, i64 8, !23, i64 16, !17, i64 24, !17, i64 28, !17, i64 32}
!37 = !{!"_ZTS14b2BodyUserData", !14, i64 0}
!38 = !{i64 0, i64 4, !39, i64 4, i64 4, !39, i64 8, i64 4, !39, i64 12, i64 4, !39}
!39 = !{!17, !17, i64 0}
!40 = !{!31, !17, i64 72}
!41 = !{!42, !17, i64 180}
!42 = !{!"_ZTS15b2RevoluteJoint", !20, i64 0, !23, i64 128, !23, i64 136, !23, i64 144, !17, i64 152, !17, i64 156, !17, i64 160, !16, i64 164, !17, i64 168, !17, i64 172, !16, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !22, i64 192, !22, i64 196, !23, i64 200, !23, i64 208, !23, i64 216, !23, i64 224, !17, i64 232, !17, i64 236, !17, i64 240, !17, i64 244, !43, i64 248, !17, i64 264, !17, i64 268}
!43 = !{!"_ZTS7b2Mat22", !23, i64 0, !23, i64 8}
!44 = !{!19, !17, i64 216}
!45 = !{!46, !17, i64 160}
!46 = !{!"_ZTS16b2PrismaticJoint", !20, i64 0, !23, i64 128, !23, i64 136, !23, i64 144, !23, i64 152, !17, i64 160, !23, i64 164, !17, i64 172, !17, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !17, i64 192, !17, i64 196, !16, i64 200, !16, i64 201, !22, i64 204, !22, i64 208, !23, i64 212, !23, i64 220, !17, i64 228, !17, i64 232, !17, i64 236, !17, i64 240, !23, i64 244, !23, i64 252, !17, i64 260, !17, i64 264, !17, i64 268, !17, i64 272, !43, i64 276, !17, i64 292, !17, i64 296}
!47 = !{!19, !15, i64 160}
!48 = !{!20, !15, i64 104}
!49 = !{!19, !17, i64 220}
!50 = !{!9, !17, i64 56}
!51 = !{!19, !17, i64 228}
!52 = !{!19, !17, i64 224}
!53 = !{!19, !17, i64 232}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass