; LLVM IR from erincatto/box2d :: src (wheel_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.b2BodyState = type { %struct.b2Vec2, float, i32, %struct.b2Vec2, %struct.b2Rot }
%struct.b2Vec2 = type { float, float }
%struct.b2Rot = type { float, float }
%struct.b2JointSim = type { i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %union.anon }
%union.anon = type { %struct.b2PrismaticJoint }
%struct.b2PrismaticJoint = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, %struct.b2Softness, i8, i8, i8 }
%struct.b2Softness = type { float, float, float }
%struct.b2WheelJoint = type { %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, float, %struct.b2Softness, i8, i8, i8 }
%struct.b2StepContext = type { float, float, float, float, i32, %struct.b2Softness, %struct.b2Softness, %struct.b2Softness, float, float, ptr, ptr, ptr, ptr, ptr, i32, ptr, %struct.b2AtomicInt, ptr, ptr, ptr, i32, i32, ptr, i32, i8, [64 x i8], %struct.b2AtomicU32, [64 x i8] }
%struct.b2AtomicInt = type { i32 }
%struct.b2AtomicU32 = type { i32 }

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@__const.b2WarmStartWheelJoint.dummyState = external hidden unnamed_addr constant %struct.b2BodyState, align 4

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

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

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

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

; Function Attrs: 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) #3

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2WarmStartWheelJoint(ptr noundef %0, ptr noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %struct.b2BodyState, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %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 float, align 4
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %struct.b2Vec2, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca %struct.b2Vec2, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %35

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

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

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

44:                                               ; preds = %43, %40, %35
  br label %45

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.b2JointSim, ptr %46, i32 0, i32 6
  %48 = load float, ptr %47, align 4, !tbaa !14
  store float %48, ptr %5, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.b2JointSim, ptr %49, i32 0, i32 7
  %51 = load float, ptr %50, align 4, !tbaa !16
  store float %51, ptr %6, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.b2JointSim, ptr %52, i32 0, i32 8
  %54 = load float, ptr %53, align 4, !tbaa !17
  store float %54, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.b2JointSim, ptr %55, i32 0, i32 9
  %57 = load float, ptr %56, align 4, !tbaa !18
  store float %57, ptr %8, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 @__const.b2WarmStartWheelJoint.dummyState, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.b2JointSim, ptr %58, i32 0, i32 10
  store ptr %59, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.b2WheelJoint, ptr %60, i32 0, i32 12
  %62 = load i32, ptr %61, align 4, !tbaa !19
  %63 = icmp eq i32 %62, -1
  br i1 %63, label %64, label %65

64:                                               ; preds = %45
  br label %74

65:                                               ; preds = %45
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.b2StepContext, ptr %66, i32 0, i32 12
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b2WheelJoint, ptr %69, i32 0, i32 12
  %71 = load i32, ptr %70, align 4, !tbaa !19
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.b2BodyState, ptr %68, i64 %72
  br label %74

74:                                               ; preds = %65, %64
  %75 = phi ptr [ %9, %64 ], [ %73, %65 ]
  store ptr %75, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.b2WheelJoint, ptr %76, i32 0, i32 13
  %78 = load i32, ptr %77, align 4, !tbaa !27
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %80, label %81

80:                                               ; preds = %74
  br label %90

81:                                               ; preds = %74
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.b2StepContext, ptr %82, i32 0, i32 12
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.b2WheelJoint, ptr %85, i32 0, i32 13
  %87 = load i32, ptr %86, align 4, !tbaa !27
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.b2BodyState, ptr %84, i64 %88
  br label %90

90:                                               ; preds = %81, %80
  %91 = phi ptr [ %9, %80 ], [ %89, %81 ]
  store ptr %91, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.b2BodyState, ptr %92, i32 0, i32 4
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b2WheelJoint, ptr %94, i32 0, i32 14
  %96 = load <2 x float>, ptr %93, align 4
  %97 = load <2 x float>, ptr %95, align 4
  %98 = call <2 x float> @b2RotateVector(<2 x float> %96, <2 x float> %97)
  store <2 x float> %98, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.b2BodyState, ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.b2WheelJoint, ptr %101, i32 0, i32 15
  %103 = load <2 x float>, ptr %100, align 4
  %104 = load <2 x float>, ptr %102, align 4
  %105 = call <2 x float> @b2RotateVector(<2 x float> %103, <2 x float> %104)
  store <2 x float> %105, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.b2BodyState, ptr %106, i32 0, i32 3
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2BodyState, ptr %108, i32 0, i32 3
  %110 = load <2 x float>, ptr %107, align 4
  %111 = load <2 x float>, ptr %109, align 4
  %112 = call <2 x float> @b2Sub(<2 x float> %110, <2 x float> %111)
  store <2 x float> %112, ptr %17, align 4
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.b2WheelJoint, ptr %113, i32 0, i32 17
  %115 = load <2 x float>, ptr %17, align 4
  %116 = load <2 x float>, ptr %114, align 4
  %117 = call <2 x float> @b2Add(<2 x float> %115, <2 x float> %116)
  store <2 x float> %117, ptr %16, align 4
  %118 = load <2 x float>, ptr %14, align 4
  %119 = load <2 x float>, ptr %13, align 4
  %120 = call <2 x float> @b2Sub(<2 x float> %118, <2 x float> %119)
  store <2 x float> %120, ptr %18, align 4
  %121 = load <2 x float>, ptr %16, align 4
  %122 = load <2 x float>, ptr %18, align 4
  %123 = call <2 x float> @b2Add(<2 x float> %121, <2 x float> %122)
  store <2 x float> %123, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.b2BodyState, ptr %124, i32 0, i32 4
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.b2WheelJoint, ptr %126, i32 0, i32 16
  %128 = load <2 x float>, ptr %125, align 4
  %129 = load <2 x float>, ptr %127, align 4
  %130 = call <2 x float> @b2RotateVector(<2 x float> %128, <2 x float> %129)
  store <2 x float> %130, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %131 = load <2 x float>, ptr %19, align 4
  %132 = call <2 x float> @b2LeftPerp(<2 x float> %131)
  store <2 x float> %132, ptr %20, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %133 = load <2 x float>, ptr %15, align 4
  %134 = load <2 x float>, ptr %13, align 4
  %135 = call <2 x float> @b2Add(<2 x float> %133, <2 x float> %134)
  store <2 x float> %135, ptr %22, align 4
  %136 = load <2 x float>, ptr %22, align 4
  %137 = load <2 x float>, ptr %19, align 4
  %138 = call float @b2Cross(<2 x float> %136, <2 x float> %137)
  store float %138, ptr %21, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %139 = load <2 x float>, ptr %14, align 4
  %140 = load <2 x float>, ptr %19, align 4
  %141 = call float @b2Cross(<2 x float> %139, <2 x float> %140)
  store float %141, ptr %23, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %142 = load <2 x float>, ptr %15, align 4
  %143 = load <2 x float>, ptr %13, align 4
  %144 = call <2 x float> @b2Add(<2 x float> %142, <2 x float> %143)
  store <2 x float> %144, ptr %25, align 4
  %145 = load <2 x float>, ptr %25, align 4
  %146 = load <2 x float>, ptr %20, align 4
  %147 = call float @b2Cross(<2 x float> %145, <2 x float> %146)
  store float %147, ptr %24, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %148 = load <2 x float>, ptr %14, align 4
  %149 = load <2 x float>, ptr %20, align 4
  %150 = call float @b2Cross(<2 x float> %148, <2 x float> %149)
  store float %150, ptr %26, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.b2WheelJoint, ptr %151, i32 0, i32 3
  %153 = load float, ptr %152, align 4, !tbaa !28
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.b2WheelJoint, ptr %154, i32 0, i32 4
  %156 = load float, ptr %155, align 4, !tbaa !29
  %157 = fadd float %153, %156
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.b2WheelJoint, ptr %158, i32 0, i32 5
  %160 = load float, ptr %159, align 4, !tbaa !30
  %161 = fsub float %157, %160
  store float %161, ptr %27, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %162 = load float, ptr %27, align 4, !tbaa !15
  %163 = load <2 x float>, ptr %19, align 4
  %164 = call <2 x float> @b2MulSV(float noundef %162, <2 x float> %163)
  store <2 x float> %164, ptr %29, align 4
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.b2WheelJoint, ptr %165, i32 0, i32 1
  %167 = load float, ptr %166, align 4, !tbaa !31
  %168 = load <2 x float>, ptr %20, align 4
  %169 = call <2 x float> @b2MulSV(float noundef %167, <2 x float> %168)
  store <2 x float> %169, ptr %30, align 4
  %170 = load <2 x float>, ptr %29, align 4
  %171 = load <2 x float>, ptr %30, align 4
  %172 = call <2 x float> @b2Add(<2 x float> %170, <2 x float> %171)
  store <2 x float> %172, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %173 = load float, ptr %27, align 4, !tbaa !15
  %174 = load float, ptr %21, align 4, !tbaa !15
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.b2WheelJoint, ptr %175, i32 0, i32 1
  %177 = load float, ptr %176, align 4, !tbaa !31
  %178 = load float, ptr %24, align 4, !tbaa !15
  %179 = fmul float %177, %178
  %180 = call float @llvm.fmuladd.f32(float %173, float %174, float %179)
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.b2WheelJoint, ptr %181, i32 0, i32 2
  %183 = load float, ptr %182, align 4, !tbaa !32
  %184 = fadd float %180, %183
  store float %184, ptr %31, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %185 = load float, ptr %27, align 4, !tbaa !15
  %186 = load float, ptr %23, align 4, !tbaa !15
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.b2WheelJoint, ptr %187, i32 0, i32 1
  %189 = load float, ptr %188, align 4, !tbaa !31
  %190 = load float, ptr %26, align 4, !tbaa !15
  %191 = fmul float %189, %190
  %192 = call float @llvm.fmuladd.f32(float %185, float %186, float %191)
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.b2WheelJoint, ptr %193, i32 0, i32 2
  %195 = load float, ptr %194, align 4, !tbaa !32
  %196 = fadd float %192, %195
  store float %196, ptr %32, align 4, !tbaa !15
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.b2BodyState, ptr %197, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %199 = load ptr, ptr %11, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.b2BodyState, ptr %199, i32 0, i32 0
  %201 = load float, ptr %5, align 4, !tbaa !15
  %202 = load <2 x float>, ptr %200, align 4
  %203 = load <2 x float>, ptr %28, align 4
  %204 = call <2 x float> @b2MulSub(<2 x float> %202, float noundef %201, <2 x float> %203)
  store <2 x float> %204, ptr %33, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %198, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  %205 = load float, ptr %7, align 4, !tbaa !15
  %206 = load float, ptr %31, align 4, !tbaa !15
  %207 = load ptr, ptr %11, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.b2BodyState, ptr %207, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !34
  %210 = fneg float %205
  %211 = call float @llvm.fmuladd.f32(float %210, float %206, float %209)
  store float %211, ptr %208, align 4, !tbaa !34
  %212 = load ptr, ptr %12, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.b2BodyState, ptr %212, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.b2BodyState, ptr %214, i32 0, i32 0
  %216 = load float, ptr %6, align 4, !tbaa !15
  %217 = load <2 x float>, ptr %215, align 4
  %218 = load <2 x float>, ptr %28, align 4
  %219 = call <2 x float> @b2MulAdd(<2 x float> %217, float noundef %216, <2 x float> %218)
  store <2 x float> %219, ptr %34, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %213, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  %220 = load float, ptr %8, align 4, !tbaa !15
  %221 = load float, ptr %32, align 4, !tbaa !15
  %222 = load ptr, ptr %12, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.b2BodyState, ptr %222, i32 0, i32 1
  %224 = load float, ptr %223, align 4, !tbaa !34
  %225 = call float @llvm.fmuladd.f32(float %220, float %221, float %224)
  store float %225, ptr %223, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 12}
!10 = !{!"b2JointSim", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !7, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!10, !13, i64 32}
!15 = !{!13, !13, i64 0}
!16 = !{!10, !13, i64 36}
!17 = !{!10, !13, i64 40}
!18 = !{!10, !13, i64 44}
!19 = !{!20, !11, i64 52}
!20 = !{!"b2WheelJoint", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !11, i64 52, !11, i64 56, !12, i64 60, !12, i64 68, !12, i64 76, !12, i64 84, !13, i64 92, !13, i64 96, !13, i64 100, !21, i64 104, !22, i64 116, !22, i64 117, !22, i64 118}
!21 = !{!"b2Softness", !13, i64 0, !13, i64 4, !13, i64 8}
!22 = !{!"_Bool", !7, i64 0}
!23 = !{!24, !6, i64 80}
!24 = !{!"b2StepContext", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !11, i64 16, !21, i64 20, !21, i64 32, !21, i64 44, !13, i64 56, !13, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !25, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !11, i64 152, !11, i64 156, !6, i64 160, !11, i64 168, !22, i64 172, !7, i64 173, !26, i64 240, !7, i64 244}
!25 = !{!"b2AtomicInt", !11, i64 0}
!26 = !{!"b2AtomicU32", !11, i64 0}
!27 = !{!20, !11, i64 56}
!28 = !{!20, !13, i64 16}
!29 = !{!20, !13, i64 20}
!30 = !{!20, !13, i64 24}
!31 = !{!20, !13, i64 8}
!32 = !{!20, !13, i64 12}
!33 = !{i64 0, i64 4, !15, i64 4, i64 4, !15}
!34 = !{!35, !13, i64 8}
!35 = !{!"b2BodyState", !12, i64 0, !13, i64 8, !11, i64 12, !12, i64 16, !36, i64 24}
!36 = !{!"b2Rot", !13, i64 0, !13, i64 4}


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

@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@__const.b2WarmStartWheelJoint.dummyState = external hidden unnamed_addr constant %struct.b2BodyState, align 4

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

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

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

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #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) #3

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2WarmStartWheelJoint(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #6 {
  %3 = alloca %struct.b2BodyState, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 7
  br i1 %6, label %10, label %7

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

9:                                                ; preds = %7
  tail call void @llvm.trap()
  unreachable

10:                                               ; preds = %2, %7
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = load float, ptr %11, align 4, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %0, i64 36
  %14 = load float, ptr %13, align 4, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  %16 = load float, ptr %15, align 4, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %0, i64 44
  %18 = load float, ptr %17, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(32) @__const.b2WarmStartWheelJoint.dummyState, i64 32, i1 false)
  %19 = getelementptr inbounds i8, ptr %0, i64 100
  %20 = load i32, ptr %19, align 4, !tbaa !16
  %21 = icmp eq i32 %20, -1
  br i1 %21, label %27, label %22

22:                                               ; preds = %10
  %23 = getelementptr inbounds i8, ptr %1, i64 80
  %24 = load ptr, ptr %23, align 8, !tbaa !20
  %25 = sext i32 %20 to i64
  %26 = getelementptr inbounds %struct.b2BodyState, ptr %24, i64 %25
  br label %27

27:                                               ; preds = %10, %22
  %28 = phi ptr [ %26, %22 ], [ %3, %10 ]
  %29 = getelementptr inbounds i8, ptr %0, i64 104
  %30 = load i32, ptr %29, align 4, !tbaa !25
  %31 = icmp eq i32 %30, -1
  br i1 %31, label %37, label %32

32:                                               ; preds = %27
  %33 = getelementptr inbounds i8, ptr %1, i64 80
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = sext i32 %30 to i64
  %36 = getelementptr inbounds %struct.b2BodyState, ptr %34, i64 %35
  br label %37

37:                                               ; preds = %27, %32
  %38 = phi ptr [ %36, %32 ], [ %3, %27 ]
  %39 = getelementptr inbounds i8, ptr %28, i64 24
  %40 = getelementptr inbounds i8, ptr %0, i64 108
  %41 = load <2 x float>, ptr %39, align 4
  %42 = load <2 x float>, ptr %40, align 4
  %43 = tail call <2 x float> @b2RotateVector(<2 x float> %41, <2 x float> %42)
  %44 = getelementptr inbounds i8, ptr %38, i64 24
  %45 = getelementptr inbounds i8, ptr %0, i64 116
  %46 = load <2 x float>, ptr %44, align 4
  %47 = load <2 x float>, ptr %45, align 4
  %48 = tail call <2 x float> @b2RotateVector(<2 x float> %46, <2 x float> %47)
  %49 = getelementptr inbounds i8, ptr %38, i64 16
  %50 = getelementptr inbounds i8, ptr %28, i64 16
  %51 = load <2 x float>, ptr %49, align 4
  %52 = load <2 x float>, ptr %50, align 4
  %53 = tail call <2 x float> @b2Sub(<2 x float> %51, <2 x float> %52)
  %54 = getelementptr inbounds i8, ptr %0, i64 132
  %55 = load <2 x float>, ptr %54, align 4
  %56 = tail call <2 x float> @b2Add(<2 x float> %53, <2 x float> %55)
  %57 = tail call <2 x float> @b2Sub(<2 x float> %48, <2 x float> %43)
  %58 = tail call <2 x float> @b2Add(<2 x float> %56, <2 x float> %57)
  %59 = getelementptr inbounds i8, ptr %0, i64 124
  %60 = load <2 x float>, ptr %39, align 4
  %61 = load <2 x float>, ptr %59, align 4
  %62 = tail call <2 x float> @b2RotateVector(<2 x float> %60, <2 x float> %61)
  %63 = tail call <2 x float> @b2LeftPerp(<2 x float> %62)
  %64 = tail call <2 x float> @b2Add(<2 x float> %58, <2 x float> %43)
  %65 = tail call float @b2Cross(<2 x float> %64, <2 x float> %62)
  %66 = tail call float @b2Cross(<2 x float> %48, <2 x float> %62)
  %67 = tail call <2 x float> @b2Add(<2 x float> %58, <2 x float> %43)
  %68 = tail call float @b2Cross(<2 x float> %67, <2 x float> %63)
  %69 = tail call float @b2Cross(<2 x float> %48, <2 x float> %63)
  %70 = getelementptr inbounds i8, ptr %0, i64 64
  %71 = load float, ptr %70, align 4, !tbaa !26
  %72 = getelementptr inbounds i8, ptr %0, i64 68
  %73 = load float, ptr %72, align 4, !tbaa !27
  %74 = fadd float %71, %73
  %75 = getelementptr inbounds i8, ptr %0, i64 72
  %76 = load float, ptr %75, align 4, !tbaa !28
  %77 = fsub float %74, %76
  %78 = tail call <2 x float> @b2MulSV(float noundef %77, <2 x float> %62)
  %79 = getelementptr inbounds i8, ptr %0, i64 56
  %80 = load float, ptr %79, align 4, !tbaa !29
  %81 = tail call <2 x float> @b2MulSV(float noundef %80, <2 x float> %63)
  %82 = tail call <2 x float> @b2Add(<2 x float> %78, <2 x float> %81)
  %83 = load float, ptr %79, align 4, !tbaa !29
  %84 = fmul float %68, %83
  %85 = tail call float @llvm.fmuladd.f32(float %77, float %65, float %84)
  %86 = getelementptr inbounds i8, ptr %0, i64 60
  %87 = load float, ptr %86, align 4, !tbaa !30
  %88 = fadd float %87, %85
  %89 = fmul float %69, %83
  %90 = tail call float @llvm.fmuladd.f32(float %77, float %66, float %89)
  %91 = fadd float %87, %90
  %92 = load <2 x float>, ptr %28, align 4
  %93 = tail call <2 x float> @b2MulSub(<2 x float> %92, float noundef %12, <2 x float> %82)
  store <2 x float> %93, ptr %28, align 4
  %94 = getelementptr inbounds i8, ptr %28, i64 8
  %95 = load float, ptr %94, align 4, !tbaa !31
  %96 = fneg float %16
  %97 = tail call float @llvm.fmuladd.f32(float %96, float %88, float %95)
  store float %97, ptr %94, align 4, !tbaa !31
  %98 = load <2 x float>, ptr %38, align 4
  %99 = tail call <2 x float> @b2MulAdd(<2 x float> %98, float noundef %14, <2 x float> %82)
  store <2 x float> %99, ptr %38, align 4
  %100 = getelementptr inbounds i8, ptr %38, i64 8
  %101 = load float, ptr %100, align 4, !tbaa !31
  %102 = tail call float @llvm.fmuladd.f32(float %18, float %91, float %101)
  store float %102, ptr %100, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 12}
!6 = !{!"b2JointSim", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !8, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"b2Vec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !11, i64 32}
!13 = !{!6, !11, i64 36}
!14 = !{!6, !11, i64 40}
!15 = !{!6, !11, i64 44}
!16 = !{!17, !7, i64 52}
!17 = !{!"b2WheelJoint", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 52, !7, i64 56, !10, i64 60, !10, i64 68, !10, i64 76, !10, i64 84, !11, i64 92, !11, i64 96, !11, i64 100, !18, i64 104, !19, i64 116, !19, i64 117, !19, i64 118}
!18 = !{!"b2Softness", !11, i64 0, !11, i64 4, !11, i64 8}
!19 = !{!"_Bool", !8, i64 0}
!20 = !{!21, !22, i64 80}
!21 = !{!"b2StepContext", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !7, i64 16, !18, i64 20, !18, i64 32, !18, i64 44, !11, i64 56, !11, i64 60, !22, i64 64, !22, i64 72, !22, i64 80, !22, i64 88, !22, i64 96, !7, i64 104, !22, i64 112, !23, i64 120, !22, i64 128, !22, i64 136, !22, i64 144, !7, i64 152, !7, i64 156, !22, i64 160, !7, i64 168, !19, i64 172, !8, i64 173, !24, i64 240, !8, i64 244}
!22 = !{!"any pointer", !8, i64 0}
!23 = !{!"b2AtomicInt", !7, i64 0}
!24 = !{!"b2AtomicU32", !7, i64 0}
!25 = !{!17, !7, i64 56}
!26 = !{!17, !11, i64 16}
!27 = !{!17, !11, i64 20}
!28 = !{!17, !11, i64 24}
!29 = !{!17, !11, i64 8}
!30 = !{!17, !11, i64 12}
!31 = !{!32, !11, i64 8}
!32 = !{!"b2BodyState", !10, i64 0, !11, i64 8, !7, i64 12, !10, i64 16, !33, i64 24}
!33 = !{!"b2Rot", !11, i64 0, !11, i64 4}


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