; LLVM IR from erincatto/box2d :: src (revolute_joint)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Transform = type { %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.b2DebugDraw = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.b2AABB, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2RevoluteJoint = type { %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, %struct.b2Softness, i8, i8, i8 }

@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2DrawRevoluteJoint(ptr noundef %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, <2 x float> %4, <2 x float> %5, float noundef %6) #5 {
  %8 = alloca %struct.b2Transform, align 4
  %9 = alloca %struct.b2Transform, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.b2Rot, align 4
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca float, align 4
  %25 = alloca [32 x i8], align 16
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %struct.b2Rot, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca %struct.b2Rot, align 4
  %31 = alloca %struct.b2Vec2, align 4
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca %struct.b2Rot, align 4
  %35 = alloca %struct.b2Vec2, align 4
  %36 = alloca %struct.b2Vec2, align 4
  %37 = alloca i32, align 4
  %38 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %2, ptr %38, align 4
  %39 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %3, ptr %39, align 4
  %40 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  store <2 x float> %4, ptr %40, align 4
  %41 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  store <2 x float> %5, ptr %41, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store float %6, ptr %12, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %7
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.b2JointSim, ptr %43, i32 0, i32 3
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = icmp eq i32 %45, 5
  br i1 %46, label %51, label %47

47:                                               ; preds = %42
  %48 = call i32 @b2InternalAssertFcn(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 476)
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %51

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

51:                                               ; preds = %50, %47, %42
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.b2JointSim, ptr %53, i32 0, i32 10
  store ptr %54, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.b2JointSim, ptr %55, i32 0, i32 4
  %57 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  %58 = load <2 x float>, ptr %57, align 4
  %59 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  %60 = load <2 x float>, ptr %59, align 4
  %61 = load <2 x float>, ptr %56, align 4
  %62 = call <2 x float> @b2TransformPoint(<2 x float> %58, <2 x float> %60, <2 x float> %61)
  store <2 x float> %62, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.b2JointSim, ptr %63, i32 0, i32 5
  %65 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %66 = load <2 x float>, ptr %65, align 4
  %67 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %68 = load <2 x float>, ptr %67, align 4
  %69 = load <2 x float>, ptr %64, align 4
  %70 = call <2 x float> @b2TransformPoint(<2 x float> %66, <2 x float> %68, <2 x float> %69)
  store <2 x float> %70, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 8421504, ptr %16, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 32768, ptr %17, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 16711680, ptr %18, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %71 = load float, ptr %12, align 4, !tbaa !9
  store float %71, ptr %19, align 4, !tbaa !9
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.b2DebugDraw, ptr %72, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = load float, ptr %19, align 4, !tbaa !9
  %76 = load i32, ptr %16, align 4, !tbaa !15
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.b2DebugDraw, ptr %77, i32 0, i32 24
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  %80 = load <2 x float>, ptr %15, align 4
  call void %74(<2 x float> %80, float noundef %75, i32 noundef %76, ptr noundef %79)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %81 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 1
  %82 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 1
  %83 = load <2 x float>, ptr %81, align 4
  %84 = load <2 x float>, ptr %82, align 4
  %85 = call float @b2RelativeAngle(<2 x float> %83, <2 x float> %84)
  store float %85, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %86 = load float, ptr %20, align 4, !tbaa !9
  %87 = call <2 x float> @b2MakeRot(float noundef %86)
  store <2 x float> %87, ptr %21, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %88 = getelementptr inbounds %struct.b2Vec2, ptr %22, i32 0, i32 0
  %89 = load float, ptr %19, align 4, !tbaa !9
  %90 = getelementptr inbounds %struct.b2Rot, ptr %21, i32 0, i32 0
  %91 = load float, ptr %90, align 4, !tbaa !21
  %92 = fmul float %89, %91
  store float %92, ptr %88, align 4, !tbaa !23
  %93 = getelementptr inbounds %struct.b2Vec2, ptr %22, i32 0, i32 1
  %94 = load float, ptr %19, align 4, !tbaa !9
  %95 = getelementptr inbounds %struct.b2Rot, ptr %21, i32 0, i32 1
  %96 = load float, ptr %95, align 4, !tbaa !24
  %97 = fmul float %94, %96
  store float %97, ptr %93, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %98 = load <2 x float>, ptr %15, align 4
  %99 = load <2 x float>, ptr %22, align 4
  %100 = call <2 x float> @b2Add(<2 x float> %98, <2 x float> %99)
  store <2 x float> %100, ptr %23, align 4
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.b2DebugDraw, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !26
  %104 = load i32, ptr %16, align 4, !tbaa !15
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2DebugDraw, ptr %105, i32 0, i32 24
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  %108 = load <2 x float>, ptr %15, align 4
  %109 = load <2 x float>, ptr %23, align 4
  call void %103(<2 x float> %108, <2 x float> %109, i32 noundef %104, ptr noundef %107)
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.b2DebugDraw, ptr %110, i32 0, i32 13
  %112 = load i8, ptr %111, align 1, !tbaa !27, !range !28, !noundef !29
  %113 = trunc i8 %112 to i1
  br i1 %113, label %114, label %135

114:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %115 = load float, ptr %20, align 4, !tbaa !9
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %116, i32 0, i32 9
  %118 = load float, ptr %117, align 4, !tbaa !30
  %119 = fsub float %115, %118
  %120 = call float @b2UnwindAngle(float noundef %119)
  store float %120, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  %121 = getelementptr inbounds [32 x i8], ptr %25, i64 0, i64 0
  %122 = load float, ptr %24, align 4, !tbaa !9
  %123 = fmul float 1.800000e+02, %122
  %124 = fdiv float %123, 0x400921FB60000000
  %125 = fpext float %124 to double
  %126 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %121, i64 noundef 32, ptr noundef @.str.6, double noundef %125) #7
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.b2DebugDraw, ptr %127, i32 0, i32 8
  %129 = load ptr, ptr %128, align 8, !tbaa !33
  %130 = getelementptr inbounds [32 x i8], ptr %25, i64 0, i64 0
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.b2DebugDraw, ptr %131, i32 0, i32 24
  %133 = load ptr, ptr %132, align 8, !tbaa !20
  %134 = load <2 x float>, ptr %23, align 4
  call void %129(<2 x float> %134, ptr noundef %130, i32 noundef 16777215, ptr noundef %133)
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %135

135:                                              ; preds = %114, %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %136, i32 0, i32 10
  %138 = load float, ptr %137, align 4, !tbaa !34
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %139, i32 0, i32 9
  %141 = load float, ptr %140, align 4, !tbaa !30
  %142 = fadd float %138, %141
  store float %142, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %143, i32 0, i32 11
  %145 = load float, ptr %144, align 4, !tbaa !35
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %146, i32 0, i32 9
  %148 = load float, ptr %147, align 4, !tbaa !30
  %149 = fadd float %145, %148
  store float %149, ptr %27, align 4, !tbaa !9
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %150, i32 0, i32 22
  %152 = load i8, ptr %151, align 2, !tbaa !36, !range !28, !noundef !29
  %153 = trunc i8 %152 to i1
  br i1 %153, label %154, label %228

154:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %155 = load float, ptr %26, align 4, !tbaa !9
  %156 = call <2 x float> @b2MakeRot(float noundef %155)
  store <2 x float> %156, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %157 = getelementptr inbounds %struct.b2Vec2, ptr %29, i32 0, i32 0
  %158 = load float, ptr %19, align 4, !tbaa !9
  %159 = getelementptr inbounds %struct.b2Rot, ptr %28, i32 0, i32 0
  %160 = load float, ptr %159, align 4, !tbaa !21
  %161 = fmul float %158, %160
  store float %161, ptr %157, align 4, !tbaa !23
  %162 = getelementptr inbounds %struct.b2Vec2, ptr %29, i32 0, i32 1
  %163 = load float, ptr %19, align 4, !tbaa !9
  %164 = getelementptr inbounds %struct.b2Rot, ptr %28, i32 0, i32 1
  %165 = load float, ptr %164, align 4, !tbaa !24
  %166 = fmul float %163, %165
  store float %166, ptr %162, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %167 = load float, ptr %27, align 4, !tbaa !9
  %168 = call <2 x float> @b2MakeRot(float noundef %167)
  store <2 x float> %168, ptr %30, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %169 = getelementptr inbounds %struct.b2Vec2, ptr %31, i32 0, i32 0
  %170 = load float, ptr %19, align 4, !tbaa !9
  %171 = getelementptr inbounds %struct.b2Rot, ptr %30, i32 0, i32 0
  %172 = load float, ptr %171, align 4, !tbaa !21
  %173 = fmul float %170, %172
  store float %173, ptr %169, align 4, !tbaa !23
  %174 = getelementptr inbounds %struct.b2Vec2, ptr %31, i32 0, i32 1
  %175 = load float, ptr %19, align 4, !tbaa !9
  %176 = getelementptr inbounds %struct.b2Rot, ptr %30, i32 0, i32 1
  %177 = load float, ptr %176, align 4, !tbaa !24
  %178 = fmul float %175, %177
  store float %178, ptr %174, align 4, !tbaa !25
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.b2DebugDraw, ptr %179, i32 0, i32 5
  %181 = load ptr, ptr %180, align 8, !tbaa !26
  %182 = load <2 x float>, ptr %15, align 4
  %183 = load <2 x float>, ptr %29, align 4
  %184 = call <2 x float> @b2Add(<2 x float> %182, <2 x float> %183)
  store <2 x float> %184, ptr %32, align 4
  %185 = load i32, ptr %17, align 4, !tbaa !15
  %186 = load ptr, ptr %10, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.b2DebugDraw, ptr %186, i32 0, i32 24
  %188 = load ptr, ptr %187, align 8, !tbaa !20
  %189 = load <2 x float>, ptr %15, align 4
  %190 = load <2 x float>, ptr %32, align 4
  call void %181(<2 x float> %189, <2 x float> %190, i32 noundef %185, ptr noundef %188)
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.b2DebugDraw, ptr %191, i32 0, i32 5
  %193 = load ptr, ptr %192, align 8, !tbaa !26
  %194 = load <2 x float>, ptr %15, align 4
  %195 = load <2 x float>, ptr %31, align 4
  %196 = call <2 x float> @b2Add(<2 x float> %194, <2 x float> %195)
  store <2 x float> %196, ptr %33, align 4
  %197 = load i32, ptr %18, align 4, !tbaa !15
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.b2DebugDraw, ptr %198, i32 0, i32 24
  %200 = load ptr, ptr %199, align 8, !tbaa !20
  %201 = load <2 x float>, ptr %15, align 4
  %202 = load <2 x float>, ptr %33, align 4
  call void %193(<2 x float> %201, <2 x float> %202, i32 noundef %197, ptr noundef %200)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %203 = load ptr, ptr %13, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.b2RevoluteJoint, ptr %203, i32 0, i32 9
  %205 = load float, ptr %204, align 4, !tbaa !30
  %206 = call <2 x float> @b2MakeRot(float noundef %205)
  store <2 x float> %206, ptr %34, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %207 = getelementptr inbounds %struct.b2Vec2, ptr %35, i32 0, i32 0
  %208 = load float, ptr %19, align 4, !tbaa !9
  %209 = getelementptr inbounds %struct.b2Rot, ptr %34, i32 0, i32 0
  %210 = load float, ptr %209, align 4, !tbaa !21
  %211 = fmul float %208, %210
  store float %211, ptr %207, align 4, !tbaa !23
  %212 = getelementptr inbounds %struct.b2Vec2, ptr %35, i32 0, i32 1
  %213 = load float, ptr %19, align 4, !tbaa !9
  %214 = getelementptr inbounds %struct.b2Rot, ptr %34, i32 0, i32 1
  %215 = load float, ptr %214, align 4, !tbaa !24
  %216 = fmul float %213, %215
  store float %216, ptr %212, align 4, !tbaa !25
  %217 = load ptr, ptr %10, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.b2DebugDraw, ptr %217, i32 0, i32 5
  %219 = load ptr, ptr %218, align 8, !tbaa !26
  %220 = load <2 x float>, ptr %15, align 4
  %221 = load <2 x float>, ptr %35, align 4
  %222 = call <2 x float> @b2Add(<2 x float> %220, <2 x float> %221)
  store <2 x float> %222, ptr %36, align 4
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.b2DebugDraw, ptr %223, i32 0, i32 24
  %225 = load ptr, ptr %224, align 8, !tbaa !20
  %226 = load <2 x float>, ptr %15, align 4
  %227 = load <2 x float>, ptr %36, align 4
  call void %219(<2 x float> %226, <2 x float> %227, i32 noundef 255, ptr noundef %225)
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %228

228:                                              ; preds = %154, %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  store i32 16766720, ptr %37, align 4, !tbaa !15
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.b2DebugDraw, ptr %229, i32 0, i32 5
  %231 = load ptr, ptr %230, align 8, !tbaa !26
  %232 = getelementptr inbounds %struct.b2Transform, ptr %8, i32 0, i32 0
  %233 = load i32, ptr %37, align 4, !tbaa !15
  %234 = load ptr, ptr %10, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.b2DebugDraw, ptr %234, i32 0, i32 24
  %236 = load ptr, ptr %235, align 8, !tbaa !20
  %237 = load <2 x float>, ptr %232, align 4
  %238 = load <2 x float>, ptr %14, align 4
  call void %231(<2 x float> %237, <2 x float> %238, i32 noundef %233, ptr noundef %236)
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.b2DebugDraw, ptr %239, i32 0, i32 5
  %241 = load ptr, ptr %240, align 8, !tbaa !26
  %242 = load i32, ptr %37, align 4, !tbaa !15
  %243 = load ptr, ptr %10, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.b2DebugDraw, ptr %243, i32 0, i32 24
  %245 = load ptr, ptr %244, align 8, !tbaa !20
  %246 = load <2 x float>, ptr %14, align 4
  %247 = load <2 x float>, ptr %15, align 4
  call void %241(<2 x float> %246, <2 x float> %247, i32 noundef %242, ptr noundef %245)
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.b2DebugDraw, ptr %248, i32 0, i32 5
  %250 = load ptr, ptr %249, align 8, !tbaa !26
  %251 = getelementptr inbounds %struct.b2Transform, ptr %9, i32 0, i32 0
  %252 = load i32, ptr %37, align 4, !tbaa !15
  %253 = load ptr, ptr %10, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.b2DebugDraw, ptr %253, i32 0, i32 24
  %255 = load ptr, ptr %254, align 8, !tbaa !20
  %256 = load <2 x float>, ptr %251, align 4
  %257 = load <2 x float>, ptr %15, align 4
  call void %250(<2 x float> %256, <2 x float> %257, i32 noundef %252, ptr noundef %255)
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #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 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  ret void
}

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

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 12}
!12 = !{!"b2JointSim", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !14, i64 16, !14, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !7, i64 48}
!13 = !{!"int", !7, i64 0}
!14 = !{!"b2Vec2", !10, i64 0, !10, i64 4}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"b2DebugDraw", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !18, i64 72, !19, i64 88, !19, i64 89, !19, i64 90, !19, i64 91, !19, i64 92, !19, i64 93, !19, i64 94, !19, i64 95, !19, i64 96, !19, i64 97, !19, i64 98, !19, i64 99, !19, i64 100, !19, i64 101, !6, i64 104}
!18 = !{!"b2AABB", !14, i64 0, !14, i64 8}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!17, !6, i64 104}
!21 = !{!22, !10, i64 0}
!22 = !{!"b2Rot", !10, i64 0, !10, i64 4}
!23 = !{!14, !10, i64 0}
!24 = !{!22, !10, i64 4}
!25 = !{!14, !10, i64 4}
!26 = !{!17, !6, i64 40}
!27 = !{!17, !19, i64 91}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!31, !10, i64 40}
!31 = !{!"b2RevoluteJoint", !14, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !13, i64 52, !13, i64 56, !14, i64 60, !14, i64 68, !14, i64 76, !10, i64 84, !10, i64 88, !32, i64 92, !19, i64 104, !19, i64 105, !19, i64 106}
!32 = !{!"b2Softness", !10, i64 0, !10, i64 4, !10, i64 8}
!33 = !{!17, !6, i64 64}
!34 = !{!31, !10, i64 44}
!35 = !{!31, !10, i64 48}
!36 = !{!31, !19, i64 106}


; 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"

@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1

; 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2DrawRevoluteJoint(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, <2 x float> %2, <2 x float> %3, <2 x float> %4, <2 x float> %5, float noundef %6) local_unnamed_addr #5 {
  %8 = alloca [32 x i8], align 16
  %9 = getelementptr inbounds i8, ptr %1, i64 12
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 5
  br i1 %11, label %15, label %12

12:                                               ; preds = %7
  %13 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 476) #7
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %15, label %14

14:                                               ; preds = %12
  tail call void @llvm.trap()
  unreachable

15:                                               ; preds = %7, %12
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = load <2 x float>, ptr %16, align 4
  %18 = tail call <2 x float> @b2TransformPoint(<2 x float> %2, <2 x float> %3, <2 x float> %17)
  %19 = getelementptr inbounds i8, ptr %1, i64 24
  %20 = load <2 x float>, ptr %19, align 4
  %21 = tail call <2 x float> @b2TransformPoint(<2 x float> %4, <2 x float> %5, <2 x float> %20)
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %0, i64 104
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  tail call void %23(<2 x float> %21, float noundef %6, i32 noundef 8421504, ptr noundef %25) #7
  %26 = tail call float @b2RelativeAngle(<2 x float> %5, <2 x float> %3)
  %27 = tail call <2 x float> @b2MakeRot(float noundef %26)
  %28 = insertelement <2 x float> poison, float %6, i64 0
  %29 = shufflevector <2 x float> %28, <2 x float> poison, <2 x i32> zeroinitializer
  %30 = fmul <2 x float> %27, %29
  %31 = tail call <2 x float> @b2Add(<2 x float> %21, <2 x float> %30)
  %32 = getelementptr inbounds i8, ptr %0, i64 40
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = load ptr, ptr %24, align 8, !tbaa !17
  tail call void %33(<2 x float> %21, <2 x float> %31, i32 noundef 8421504, ptr noundef %34) #7
  %35 = getelementptr inbounds i8, ptr %0, i64 91
  %36 = load i8, ptr %35, align 1, !tbaa !19, !range !20, !noundef !21
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %38, label %50

38:                                               ; preds = %15
  %39 = getelementptr inbounds i8, ptr %1, i64 88
  %40 = load float, ptr %39, align 4, !tbaa !22
  %41 = fsub float %26, %40
  %42 = tail call float @b2UnwindAngle(float noundef %41)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %43 = fmul float %42, 1.800000e+02
  %44 = fdiv float %43, 0x400921FB60000000
  %45 = fpext float %44 to double
  %46 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 32, ptr noundef nonnull @.str.6, double noundef %45) #7
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %49 = load ptr, ptr %24, align 8, !tbaa !17
  call void %48(<2 x float> %31, ptr noundef nonnull %8, i32 noundef 16777215, ptr noundef %49) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %50

50:                                               ; preds = %38, %15
  %51 = getelementptr inbounds i8, ptr %1, i64 154
  %52 = load i8, ptr %51, align 2, !tbaa !26, !range !20, !noundef !21
  %53 = trunc nuw i8 %52 to i1
  br i1 %53, label %54, label %79

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %1, i64 96
  %56 = load float, ptr %55, align 4, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %1, i64 88
  %58 = load float, ptr %57, align 4, !tbaa !22
  %59 = fadd float %56, %58
  %60 = getelementptr inbounds i8, ptr %1, i64 92
  %61 = load float, ptr %60, align 4, !tbaa !28
  %62 = fadd float %58, %61
  %63 = call <2 x float> @b2MakeRot(float noundef %62)
  %64 = fmul <2 x float> %63, %29
  %65 = call <2 x float> @b2MakeRot(float noundef %59)
  %66 = fmul <2 x float> %65, %29
  %67 = load ptr, ptr %32, align 8, !tbaa !18
  %68 = call <2 x float> @b2Add(<2 x float> %21, <2 x float> %64)
  %69 = load ptr, ptr %24, align 8, !tbaa !17
  call void %67(<2 x float> %21, <2 x float> %68, i32 noundef 32768, ptr noundef %69) #7
  %70 = load ptr, ptr %32, align 8, !tbaa !18
  %71 = call <2 x float> @b2Add(<2 x float> %21, <2 x float> %66)
  %72 = load ptr, ptr %24, align 8, !tbaa !17
  call void %70(<2 x float> %21, <2 x float> %71, i32 noundef 16711680, ptr noundef %72) #7
  %73 = load float, ptr %57, align 4, !tbaa !22
  %74 = call <2 x float> @b2MakeRot(float noundef %73)
  %75 = fmul <2 x float> %74, %29
  %76 = load ptr, ptr %32, align 8, !tbaa !18
  %77 = call <2 x float> @b2Add(<2 x float> %21, <2 x float> %75)
  %78 = load ptr, ptr %24, align 8, !tbaa !17
  call void %76(<2 x float> %21, <2 x float> %77, i32 noundef 255, ptr noundef %78) #7
  br label %79

79:                                               ; preds = %54, %50
  %80 = load ptr, ptr %32, align 8, !tbaa !18
  %81 = load ptr, ptr %24, align 8, !tbaa !17
  call void %80(<2 x float> %2, <2 x float> %18, i32 noundef 16766720, ptr noundef %81) #7
  %82 = load ptr, ptr %32, align 8, !tbaa !18
  %83 = load ptr, ptr %24, align 8, !tbaa !17
  call void %82(<2 x float> %18, <2 x float> %21, i32 noundef 16766720, ptr noundef %83) #7
  %84 = load ptr, ptr %32, align 8, !tbaa !18
  %85 = load ptr, ptr %24, align 8, !tbaa !17
  call void %84(<2 x float> %4, <2 x float> %21, i32 noundef 16766720, ptr noundef %85) #7
  ret void
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree 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 #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 = !{!13, !14, i64 16}
!13 = !{!"b2DebugDraw", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !15, i64 72, !16, i64 88, !16, i64 89, !16, i64 90, !16, i64 91, !16, i64 92, !16, i64 93, !16, i64 94, !16, i64 95, !16, i64 96, !16, i64 97, !16, i64 98, !16, i64 99, !16, i64 100, !16, i64 101, !14, i64 104}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"b2AABB", !10, i64 0, !10, i64 8}
!16 = !{!"_Bool", !8, i64 0}
!17 = !{!13, !14, i64 104}
!18 = !{!13, !14, i64 40}
!19 = !{!13, !16, i64 91}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!23, !11, i64 40}
!23 = !{!"b2RevoluteJoint", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !7, i64 52, !7, i64 56, !10, i64 60, !10, i64 68, !10, i64 76, !11, i64 84, !11, i64 88, !24, i64 92, !16, i64 104, !16, i64 105, !16, i64 106}
!24 = !{!"b2Softness", !11, i64 0, !11, i64 4, !11, i64 8}
!25 = !{!13, !14, i64 64}
!26 = !{!23, !16, i64 106}
!27 = !{!23, !11, i64 48}
!28 = !{!23, !11, i64 44}


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