; LLVM IR from erincatto/box2d :: src (prismatic_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.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 [71 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@__const.b2WarmStartPrismaticJoint.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: inlinehint nounwind uwtable
declare hidden <2 x float> @b2RotateVector(<2 x float>, <2 x float>) #3

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

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

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

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

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

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

; 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 @b2WarmStartPrismaticJoint(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 float, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca %struct.b2Vec2, align 4
  %25 = alloca float, align 4
  %26 = alloca %struct.b2Vec2, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca %struct.b2Vec2, align 4
  %31 = alloca %struct.b2Vec2, align 4
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca %struct.b2Vec2, align 4
  %36 = 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 %37

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

42:                                               ; preds = %37
  %43 = call i32 @b2InternalAssertFcn(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 339)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

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

46:                                               ; preds = %45, %42, %37
  br label %47

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

66:                                               ; preds = %47
  br label %76

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

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

82:                                               ; preds = %76
  br label %92

83:                                               ; preds = %76
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.b2StepContext, ptr %84, i32 0, i32 12
  %86 = load ptr, ptr %85, align 8, !tbaa !23
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.b2PrismaticJoint, ptr %87, i32 0, i32 14
  %89 = load i32, ptr %88, align 4, !tbaa !27
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds %struct.b2BodyState, ptr %86, i64 %90
  br label %92

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

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

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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 60}
!20 = !{!"b2PrismaticJoint", !12, i64 0, !12, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !11, i64 60, !11, i64 64, !12, i64 68, !12, i64 76, !12, i64 84, !12, i64 92, !13, i64 100, !13, i64 104, !21, i64 108, !22, i64 120, !22, i64 121, !22, i64 122}
!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 64}
!28 = !{!20, !13, i64 16}
!29 = !{!20, !13, i64 20}
!30 = !{!20, !13, i64 24}
!31 = !{!20, !13, i64 28}
!32 = !{!20, !13, i64 8}
!33 = !{!20, !13, i64 12}
!34 = !{i64 0, i64 4, !15, i64 4, i64 4, !15}
!35 = !{!36, !13, i64 8}
!36 = !{!"b2BodyState", !12, i64 0, !13, i64 8, !11, i64 12, !12, i64 16, !37, i64 24}
!37 = !{!"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 [71 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@__const.b2WarmStartPrismaticJoint.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: inlinehint nounwind uwtable
declare hidden <2 x float> @b2RotateVector(<2 x float>, <2 x float>) local_unnamed_addr #3

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

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

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

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

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

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

; 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 @b2WarmStartPrismaticJoint(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, 4
  br i1 %6, label %10, label %7

7:                                                ; preds = %2
  %8 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 339) #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.b2WarmStartPrismaticJoint.dummyState, i64 32, i1 false)
  %19 = getelementptr inbounds i8, ptr %0, i64 108
  %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 112
  %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 116
  %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 124
  %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 140
  %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 132
  %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> @b2Add(<2 x float> %58, <2 x float> %43)
  %64 = tail call float @b2Cross(<2 x float> %63, <2 x float> %62)
  %65 = tail call float @b2Cross(<2 x float> %48, <2 x float> %62)
  %66 = getelementptr inbounds i8, ptr %0, i64 64
  %67 = load float, ptr %66, align 4, !tbaa !26
  %68 = getelementptr inbounds i8, ptr %0, i64 68
  %69 = load float, ptr %68, align 4, !tbaa !27
  %70 = fadd float %67, %69
  %71 = getelementptr inbounds i8, ptr %0, i64 72
  %72 = load float, ptr %71, align 4, !tbaa !28
  %73 = fadd float %70, %72
  %74 = getelementptr inbounds i8, ptr %0, i64 76
  %75 = load float, ptr %74, align 4, !tbaa !29
  %76 = fsub float %73, %75
  %77 = tail call <2 x float> @b2LeftPerp(<2 x float> %62)
  %78 = tail call <2 x float> @b2Add(<2 x float> %58, <2 x float> %43)
  %79 = tail call float @b2Cross(<2 x float> %78, <2 x float> %77)
  %80 = tail call float @b2Cross(<2 x float> %48, <2 x float> %77)
  %81 = getelementptr inbounds i8, ptr %0, i64 56
  %82 = load float, ptr %81, align 4, !tbaa !30
  %83 = getelementptr inbounds i8, ptr %0, i64 60
  %84 = load float, ptr %83, align 4, !tbaa !31
  %85 = tail call <2 x float> @b2MulSV(float noundef %76, <2 x float> %62)
  %86 = tail call <2 x float> @b2MulSV(float noundef %82, <2 x float> %77)
  %87 = tail call <2 x float> @b2Add(<2 x float> %85, <2 x float> %86)
  %88 = fmul float %79, %82
  %89 = tail call float @llvm.fmuladd.f32(float %76, float %64, float %88)
  %90 = fadd float %84, %89
  %91 = fmul float %80, %82
  %92 = tail call float @llvm.fmuladd.f32(float %76, float %65, float %91)
  %93 = fadd float %84, %92
  %94 = load <2 x float>, ptr %28, align 4
  %95 = tail call <2 x float> @b2MulSub(<2 x float> %94, float noundef %12, <2 x float> %87)
  store <2 x float> %95, ptr %28, align 4
  %96 = getelementptr inbounds i8, ptr %28, i64 8
  %97 = load float, ptr %96, align 4, !tbaa !32
  %98 = fneg float %16
  %99 = tail call float @llvm.fmuladd.f32(float %98, float %90, float %97)
  store float %99, ptr %96, align 4, !tbaa !32
  %100 = load <2 x float>, ptr %38, align 4
  %101 = tail call <2 x float> @b2MulAdd(<2 x float> %100, float noundef %14, <2 x float> %87)
  store <2 x float> %101, ptr %38, align 4
  %102 = getelementptr inbounds i8, ptr %38, i64 8
  %103 = load float, ptr %102, align 4, !tbaa !32
  %104 = tail call float @llvm.fmuladd.f32(float %18, float %93, float %103)
  store float %104, ptr %102, align 4, !tbaa !32
  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 #3

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

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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 60}
!17 = !{!"b2PrismaticJoint", !10, i64 0, !10, i64 8, !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, !11, i64 52, !11, i64 56, !7, i64 60, !7, i64 64, !10, i64 68, !10, i64 76, !10, i64 84, !10, i64 92, !11, i64 100, !11, i64 104, !18, i64 108, !19, i64 120, !19, i64 121, !19, i64 122}
!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 64}
!26 = !{!17, !11, i64 16}
!27 = !{!17, !11, i64 20}
!28 = !{!17, !11, i64 24}
!29 = !{!17, !11, i64 28}
!30 = !{!17, !11, i64 8}
!31 = !{!17, !11, i64 12}
!32 = !{!33, !11, i64 8}
!33 = !{!"b2BodyState", !10, i64 0, !11, i64 8, !7, i64 12, !10, i64 16, !34, i64 24}
!34 = !{!"b2Rot", !11, i64 0, !11, i64 4}


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