; LLVM IR from erincatto/box2d :: samples/donut.ll (ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv)

; 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.b2WorldId = type { i16, i16 }
%struct.b2Vec2 = type { float, float }
%struct.b2Capsule = type { %struct.b2Vec2, %struct.b2Vec2, float }
%struct.b2BodyDef = type { i32, %struct.b2Vec2, %struct.b2Rot, %struct.b2Vec2, float, float, float, float, float, ptr, ptr, i8, i8, i8, i8, i8, i8, i32 }
%struct.b2Rot = type { float, float }
%struct.b2ShapeDef = type { ptr, %struct.b2SurfaceMaterial, float, %struct.b2Filter, i8, i8, i8, i8, i8, i8, i8, i32 }
%struct.b2SurfaceMaterial = type { float, float, float, float, i32, i32 }
%struct.b2Filter = type { i64, i64, i32 }
%struct.b2BodyId = type { i32, i16, i16 }
%struct.b2ShapeId = type { i32, i16, i16 }
%struct.b2WeldJointDef = type { %struct.b2BodyId, %struct.b2BodyId, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i8, ptr, i32 }
%struct.b2JointId = type { i32, i16, i16 }
%class.Donut = type <{ [7 x %struct.b2BodyId], [7 x %struct.b2JointId], i8, [3 x i8] }>

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv(ptr noundef nonnull align 4 dereferenceable(113) %0, i32 %1, <2 x float> %2, float noundef %3, i32 noundef %4, i1 noundef zeroext %5, ptr noundef %6) #2 align 2 {
  %8 = alloca %struct.b2WorldId, align 2
  %9 = alloca %struct.b2Vec2, align 4
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %struct.b2Capsule, align 4
  %20 = alloca %struct.b2Vec2, align 4
  %21 = alloca %struct.b2BodyDef, align 8
  %22 = alloca %struct.b2ShapeDef, align 8
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca %struct.b2Rot, align 4
  %27 = alloca %struct.b2BodyId, align 4
  %28 = alloca %struct.b2WorldId, align 2
  %29 = alloca %struct.b2BodyId, align 4
  %30 = alloca %struct.b2ShapeId, align 4
  %31 = alloca %struct.b2WeldJointDef, align 8
  %32 = alloca %struct.b2Vec2, align 4
  %33 = alloca %struct.b2Vec2, align 4
  %34 = alloca %struct.b2BodyId, align 4
  %35 = alloca i32, align 4
  %36 = alloca %struct.b2Rot, align 4
  %37 = alloca %struct.b2BodyId, align 4
  %38 = alloca %struct.b2Rot, align 4
  %39 = alloca %struct.b2BodyId, align 4
  %40 = alloca %struct.b2Rot, align 4
  %41 = alloca %struct.b2Rot, align 4
  %42 = alloca %struct.b2JointId, align 4
  %43 = alloca %struct.b2WorldId, align 2
  store i32 %1, ptr %8, align 2
  store <2 x float> %2, ptr %9, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store float %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !11
  %44 = zext i1 %5 to i8
  store i8 %44, ptr %13, align 1, !tbaa !13
  store ptr %6, ptr %14, align 8, !tbaa !5
  %45 = load ptr, ptr %10, align 8
  %46 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 2
  %47 = load i8, ptr %46, align 4, !tbaa !15, !range !17, !noundef !18
  %48 = trunc i8 %47 to i1
  %49 = zext i1 %48 to i32
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %7
  br label %54

52:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 24, ptr noundef @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #8
  unreachable

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53, %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %55

55:                                               ; preds = %82, %54
  %56 = load i32, ptr %15, align 4, !tbaa !11
  %57 = icmp slt i32 %56, 7
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %85

59:                                               ; preds = %55
  %60 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %61 = load i32, ptr %15, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %60, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.b2BodyId, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 4, !tbaa !19
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %59
  br label %70

68:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 28, ptr noundef @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #8
  unreachable

69:                                               ; No predecessors!
  br label %70

70:                                               ; preds = %69, %67
  %71 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 1
  %72 = load i32, ptr %15, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [7 x %struct.b2JointId], ptr %71, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.b2JointId, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 4, !tbaa !22
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %70
  br label %81

79:                                               ; preds = %70
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 29, ptr noundef @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #8
  unreachable

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80, %78
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %15, align 4, !tbaa !11
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %15, align 4, !tbaa !11
  br label %55, !llvm.loop !24

85:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %86 = load float, ptr %11, align 4, !tbaa !9
  %87 = fmul float 1.000000e+00, %86
  store float %87, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store float 0x3FECB91F40000000, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %88 = load float, ptr %16, align 4, !tbaa !9
  %89 = fmul float 0x401921FB60000000, %88
  %90 = fdiv float %89, 7.000000e+00
  store float %90, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 20, ptr %19) #9
  %91 = getelementptr inbounds %struct.b2Capsule, ptr %19, i32 0, i32 0
  %92 = getelementptr inbounds %struct.b2Vec2, ptr %91, i32 0, i32 0
  store float 0.000000e+00, ptr %92, align 4, !tbaa !26
  %93 = getelementptr inbounds %struct.b2Vec2, ptr %91, i32 0, i32 1
  %94 = load float, ptr %18, align 4, !tbaa !9
  %95 = fmul float -5.000000e-01, %94
  store float %95, ptr %93, align 4, !tbaa !28
  %96 = getelementptr inbounds %struct.b2Capsule, ptr %19, i32 0, i32 1
  %97 = getelementptr inbounds %struct.b2Vec2, ptr %96, i32 0, i32 0
  store float 0.000000e+00, ptr %97, align 4, !tbaa !26
  %98 = getelementptr inbounds %struct.b2Vec2, ptr %96, i32 0, i32 1
  %99 = load float, ptr %18, align 4, !tbaa !9
  %100 = fmul float 5.000000e-01, %99
  store float %100, ptr %98, align 4, !tbaa !28
  %101 = getelementptr inbounds %struct.b2Capsule, ptr %19, i32 0, i32 2
  %102 = load float, ptr %11, align 4, !tbaa !9
  %103 = fmul float 2.500000e-01, %102
  store float %103, ptr %101, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %9, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #9
  call void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8 %21)
  %104 = getelementptr inbounds %struct.b2BodyDef, ptr %21, i32 0, i32 0
  store i32 2, ptr %104, align 8, !tbaa !32
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2BodyDef, ptr %21, i32 0, i32 10
  store ptr %105, ptr %106, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 80, ptr %22) #9
  call void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8 %22)
  %107 = load i8, ptr %13, align 1, !tbaa !13, !range !17, !noundef !18
  %108 = trunc i8 %107 to i1
  %109 = getelementptr inbounds %struct.b2ShapeDef, ptr %22, i32 0, i32 5
  %110 = zext i1 %108 to i8
  store i8 %110, ptr %109, align 1, !tbaa !37
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = sub nsw i32 0, %111
  %113 = getelementptr inbounds %struct.b2ShapeDef, ptr %22, i32 0, i32 3
  %114 = getelementptr inbounds %struct.b2Filter, ptr %113, i32 0, i32 2
  store i32 %112, ptr %114, align 8, !tbaa !42
  %115 = getelementptr inbounds %struct.b2ShapeDef, ptr %22, i32 0, i32 1
  %116 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %115, i32 0, i32 0
  store float 0x3FD3333340000000, ptr %116, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store float 0.000000e+00, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %117

117:                                              ; preds = %155, %85
  %118 = load i32, ptr %24, align 4, !tbaa !11
  %119 = icmp slt i32 %118, 7
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %158

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %122 = getelementptr inbounds %struct.b2Vec2, ptr %25, i32 0, i32 0
  %123 = load float, ptr %16, align 4, !tbaa !9
  %124 = load float, ptr %23, align 4, !tbaa !9
  %125 = call float @cosf(float noundef %124) #9
  %126 = getelementptr inbounds %struct.b2Vec2, ptr %20, i32 0, i32 0
  %127 = load float, ptr %126, align 4, !tbaa !26
  %128 = call float @llvm.fmuladd.f32(float %123, float %125, float %127)
  store float %128, ptr %122, align 4, !tbaa !26
  %129 = getelementptr inbounds %struct.b2Vec2, ptr %25, i32 0, i32 1
  %130 = load float, ptr %16, align 4, !tbaa !9
  %131 = load float, ptr %23, align 4, !tbaa !9
  %132 = call float @sinf(float noundef %131) #9
  %133 = getelementptr inbounds %struct.b2Vec2, ptr %20, i32 0, i32 1
  %134 = load float, ptr %133, align 4, !tbaa !28
  %135 = call float @llvm.fmuladd.f32(float %130, float %132, float %134)
  store float %135, ptr %129, align 4, !tbaa !28
  %136 = getelementptr inbounds %struct.b2BodyDef, ptr %21, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %136, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %137 = load float, ptr %23, align 4, !tbaa !9
  %138 = call <2 x float> @_Z9b2MakeRotf(float noundef %137)
  store <2 x float> %138, ptr %26, align 4
  %139 = getelementptr inbounds %struct.b2BodyDef, ptr %21, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %139, ptr align 4 %26, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %28, ptr align 2 %8, i64 4, i1 false), !tbaa.struct !44
  %140 = load i32, ptr %28, align 2
  %141 = call i64 @b2CreateBody(i32 %140, ptr noundef %21)
  store i64 %141, ptr %27, align 4
  %142 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %143 = load i32, ptr %24, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %142, i64 0, i64 %144
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %145, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  %146 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %147 = load i32, ptr %24, align 4, !tbaa !11
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %146, i64 0, i64 %148
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %149, i64 8, i1 false), !tbaa.struct !46
  %150 = load i64, ptr %29, align 4
  %151 = call i64 @b2CreateCapsuleShape(i64 %150, ptr noundef %22, ptr noundef %19)
  store i64 %151, ptr %30, align 4
  %152 = load float, ptr %17, align 4, !tbaa !9
  %153 = load float, ptr %23, align 4, !tbaa !9
  %154 = fadd float %153, %152
  store float %154, ptr %23, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %121
  %156 = load i32, ptr %24, align 4, !tbaa !11
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %24, align 4, !tbaa !11
  br label %117, !llvm.loop !47

158:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 72, ptr %31) #9
  call void @b2DefaultWeldJointDef(ptr dead_on_unwind writable sret(%struct.b2WeldJointDef) align 8 %31)
  %159 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 6
  store float 5.000000e+00, ptr %159, align 8, !tbaa !48
  %160 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 8
  store float 0.000000e+00, ptr %160, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %161 = getelementptr inbounds %struct.b2Vec2, ptr %32, i32 0, i32 0
  store float 0.000000e+00, ptr %161, align 4, !tbaa !26
  %162 = getelementptr inbounds %struct.b2Vec2, ptr %32, i32 0, i32 1
  %163 = load float, ptr %18, align 4, !tbaa !9
  %164 = fmul float 5.000000e-01, %163
  store float %164, ptr %162, align 4, !tbaa !28
  %165 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %165, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %166 = getelementptr inbounds %struct.b2Vec2, ptr %33, i32 0, i32 0
  store float 0.000000e+00, ptr %166, align 4, !tbaa !26
  %167 = getelementptr inbounds %struct.b2Vec2, ptr %33, i32 0, i32 1
  %168 = load float, ptr %18, align 4, !tbaa !9
  %169 = fmul float -5.000000e-01, %168
  store float %169, ptr %167, align 4, !tbaa !28
  %170 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %170, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %171 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %172 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %171, i64 0, i64 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %172, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  store i32 0, ptr %35, align 4, !tbaa !11
  br label %173

173:                                              ; preds = %203, %158
  %174 = load i32, ptr %35, align 4, !tbaa !11
  %175 = icmp slt i32 %174, 7
  br i1 %175, label %177, label %176

176:                                              ; preds = %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %206

177:                                              ; preds = %173
  %178 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %178, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !46
  %179 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %180 = load i32, ptr %35, align 4, !tbaa !11
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %179, i64 0, i64 %181
  %183 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %183, ptr align 4 %182, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !46
  %184 = load i64, ptr %37, align 4
  %185 = call <2 x float> @b2Body_GetRotation(i64 %184)
  store <2 x float> %185, ptr %36, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %186 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 0
  %187 = load i32, ptr %35, align 4, !tbaa !11
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [7 x %struct.b2BodyId], ptr %186, i64 0, i64 %188
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %189, i64 8, i1 false), !tbaa.struct !46
  %190 = load i64, ptr %39, align 4
  %191 = call <2 x float> @b2Body_GetRotation(i64 %190)
  store <2 x float> %191, ptr %38, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %38, i64 8, i1 false), !tbaa.struct !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %36, i64 8, i1 false), !tbaa.struct !31
  %192 = load <2 x float>, ptr %40, align 4
  %193 = load <2 x float>, ptr %41, align 4
  %194 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %192, <2 x float> %193)
  %195 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 4
  store float %194, ptr %195, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %43, ptr align 2 %8, i64 4, i1 false), !tbaa.struct !44
  %196 = load i32, ptr %43, align 2
  %197 = call i64 @b2CreateWeldJoint(i32 %196, ptr noundef %31)
  store i64 %197, ptr %42, align 4
  %198 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 1
  %199 = load i32, ptr %35, align 4, !tbaa !11
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [7 x %struct.b2JointId], ptr %198, i64 0, i64 %200
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %201, ptr align 4 %42, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #9
  %202 = getelementptr inbounds %struct.b2WeldJointDef, ptr %31, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %202, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  br label %203

203:                                              ; preds = %177
  %204 = load i32, ptr %35, align 4, !tbaa !11
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %35, align 4, !tbaa !11
  br label %173, !llvm.loop !52

206:                                              ; preds = %176
  %207 = getelementptr inbounds %class.Donut, ptr %45, i32 0, i32 2
  store i8 1, ptr %207, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 20, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  ret void
}

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

declare void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8) #4

declare void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8) #4

; Function Attrs: nounwind
declare float @cosf(float noundef) #5

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

; Function Attrs: nounwind
declare float @sinf(float noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z9b2MakeRotf(float noundef) #7

declare i64 @b2CreateBody(i32, ptr noundef) #4

declare i64 @b2CreateCapsuleShape(i64, ptr noundef, ptr noundef) #4

declare void @b2DefaultWeldJointDef(ptr dead_on_unwind writable sret(%struct.b2WeldJointDef) align 8) #4

declare <2 x float> @b2Body_GetRotation(i64) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float>, <2 x float>) #7

declare i64 @b2CreateWeldJoint(i32, ptr noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !14, i64 112}
!16 = !{!"_ZTS5Donut", !7, i64 0, !7, i64 56, !14, i64 112}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !12, i64 0}
!20 = !{!"_ZTS8b2BodyId", !12, i64 0, !21, i64 4, !21, i64 6}
!21 = !{!"short", !7, i64 0}
!22 = !{!23, !12, i64 0}
!23 = !{!"_ZTS9b2JointId", !12, i64 0, !21, i64 4, !21, i64 6}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !10, i64 0}
!27 = !{!"_ZTS6b2Vec2", !10, i64 0, !10, i64 4}
!28 = !{!27, !10, i64 4}
!29 = !{!30, !10, i64 16}
!30 = !{!"_ZTS9b2Capsule", !27, i64 0, !27, i64 8, !10, i64 16}
!31 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!32 = !{!33, !34, i64 0}
!33 = !{!"_ZTS9b2BodyDef", !34, i64 0, !27, i64 4, !35, i64 12, !27, i64 20, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !6, i64 48, !6, i64 56, !14, i64 64, !14, i64 65, !14, i64 66, !14, i64 67, !14, i64 68, !14, i64 69, !12, i64 72}
!34 = !{!"_ZTS10b2BodyType", !7, i64 0}
!35 = !{!"_ZTS5b2Rot", !10, i64 0, !10, i64 4}
!36 = !{!33, !6, i64 56}
!37 = !{!38, !14, i64 65}
!38 = !{!"_ZTS10b2ShapeDef", !6, i64 0, !39, i64 8, !10, i64 32, !40, i64 40, !14, i64 64, !14, i64 65, !14, i64 66, !14, i64 67, !14, i64 68, !14, i64 69, !14, i64 70, !12, i64 72}
!39 = !{!"_ZTS17b2SurfaceMaterial", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !12, i64 16, !12, i64 20}
!40 = !{!"_ZTS8b2Filter", !41, i64 0, !41, i64 8, !12, i64 16}
!41 = !{!"long", !7, i64 0}
!42 = !{!38, !12, i64 56}
!43 = !{!38, !10, i64 8}
!44 = !{i64 0, i64 2, !45, i64 2, i64 2, !45}
!45 = !{!21, !21, i64 0}
!46 = !{i64 0, i64 4, !11, i64 4, i64 2, !45, i64 6, i64 2, !45}
!47 = distinct !{!47, !25}
!48 = !{!49, !10, i64 40}
!49 = !{!"_ZTS14b2WeldJointDef", !20, i64 0, !20, i64 8, !27, i64 16, !27, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !14, i64 52, !6, i64 56, !12, i64 64}
!50 = !{!49, !10, i64 48}
!51 = !{!49, !10, i64 32}
!52 = distinct !{!52, !25}


; 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.b2Capsule = type { %struct.b2Vec2, %struct.b2Vec2, float }
%struct.b2Vec2 = type { float, float }
%struct.b2BodyDef = type { i32, %struct.b2Vec2, %struct.b2Rot, %struct.b2Vec2, float, float, float, float, float, ptr, ptr, i8, i8, i8, i8, i8, i8, i32 }
%struct.b2Rot = type { float, float }
%struct.b2ShapeDef = type { ptr, %struct.b2SurfaceMaterial, float, %struct.b2Filter, i8, i8, i8, i8, i8, i8, i8, i32 }
%struct.b2SurfaceMaterial = type { float, float, float, float, i32, i32 }
%struct.b2Filter = type { i64, i64, i32 }
%struct.b2WeldJointDef = type { %struct.b2BodyId, %struct.b2BodyId, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i8, ptr, i32 }
%struct.b2BodyId = type { i32, i16, i16 }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv = external hidden unnamed_addr constant [64 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 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: mustprogress uwtable
define dso_local void @_ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv(ptr nocapture noundef nonnull align 4 dereferenceable(113) %0, i32 %1, <2 x float> %2, float noundef %3, i32 noundef %4, i1 noundef zeroext %5, ptr noundef %6) local_unnamed_addr #1 align 2 {
  %8 = alloca %struct.b2Capsule, align 4
  %9 = alloca %struct.b2BodyDef, align 8
  %10 = alloca %struct.b2ShapeDef, align 8
  %11 = alloca %struct.b2WeldJointDef, align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 112
  %13 = load i8, ptr %12, align 4, !tbaa !5, !range !10, !noundef !11
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %.preheader, label %18

.preheader:                                       ; preds = %7
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i32, ptr %0, align 4, !tbaa !12
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %161, label %160

18:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 24, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #7
  unreachable

19:                                               ; preds = %161
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i32, ptr %20, align 4, !tbaa !12
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %160

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  %25 = load i32, ptr %24, align 4, !tbaa !16
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %164

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load i32, ptr %28, align 4, !tbaa !12
  %30 = icmp eq i32 %29, 0
  br i1 %30, label %31, label %160

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %164

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = load i32, ptr %36, align 4, !tbaa !12
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %160

39:                                               ; preds = %35
  %40 = getelementptr inbounds i8, ptr %0, i64 80
  %41 = load i32, ptr %40, align 4, !tbaa !16
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %164

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = load i32, ptr %44, align 4, !tbaa !12
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %160

47:                                               ; preds = %43
  %48 = getelementptr inbounds i8, ptr %0, i64 88
  %49 = load i32, ptr %48, align 4, !tbaa !16
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %164

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %0, i64 40
  %53 = load i32, ptr %52, align 4, !tbaa !12
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %160

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %0, i64 96
  %57 = load i32, ptr %56, align 4, !tbaa !16
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %164

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %0, i64 48
  %61 = load i32, ptr %60, align 4, !tbaa !12
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %160

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %0, i64 104
  %65 = load i32, ptr %64, align 4, !tbaa !16
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %164

67:                                               ; preds = %63
  %68 = extractelement <2 x float> %2, i64 0
  %69 = extractelement <2 x float> %2, i64 1
  %70 = zext i1 %5 to i8
  %71 = fmul float %3, 0x401921FB60000000
  %72 = fdiv float %71, 7.000000e+00
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %8) #8
  store float 0.000000e+00, ptr %8, align 4, !tbaa !18
  %73 = getelementptr inbounds i8, ptr %8, i64 4
  %74 = fmul float %72, -5.000000e-01
  store float %74, ptr %73, align 4, !tbaa !21
  %75 = getelementptr inbounds i8, ptr %8, i64 8
  store float 0.000000e+00, ptr %75, align 4, !tbaa !18
  %76 = getelementptr inbounds i8, ptr %8, i64 12
  %77 = insertelement <2 x float> poison, float %72, i64 0
  %78 = insertelement <2 x float> %77, float %3, i64 1
  %79 = fmul <2 x float> %78, <float 5.000000e-01, float 2.500000e-01>
  store <2 x float> %79, ptr %76, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #8
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %9)
  store i32 2, ptr %9, align 8, !tbaa !23
  %80 = getelementptr inbounds i8, ptr %9, i64 56
  store ptr %6, ptr %80, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #8
  call void @b2DefaultShapeDef(ptr dead_on_unwind nonnull writable sret(%struct.b2ShapeDef) align 8 %10)
  %81 = getelementptr inbounds i8, ptr %10, i64 65
  store i8 %70, ptr %81, align 1, !tbaa !29
  %82 = sub nsw i32 0, %4
  %83 = getelementptr inbounds i8, ptr %10, i64 56
  store i32 %82, ptr %83, align 8, !tbaa !34
  %84 = getelementptr inbounds i8, ptr %10, i64 8
  store float 0x3FD3333340000000, ptr %84, align 8, !tbaa !35
  %85 = getelementptr inbounds i8, ptr %9, i64 4
  %.sroa.424.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %86 = getelementptr inbounds i8, ptr %9, i64 12
  %87 = fadd float %68, %3
  %88 = call float @llvm.fmuladd.f32(float %3, float 0.000000e+00, float %69)
  store float %87, ptr %85, align 4, !tbaa !22
  store float %88, ptr %.sroa.424.0..sroa_idx, align 8, !tbaa !22
  %89 = call <2 x float> @_Z9b2MakeRotf(float noundef 0.000000e+00)
  store <2 x float> %89, ptr %86, align 4
  %90 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %90, ptr %0, align 4
  %91 = call i64 @b2CreateCapsuleShape(i64 %90, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %92 = insertelement <2 x float> poison, float %3, i64 0
  %93 = shufflevector <2 x float> %92, <2 x float> poison, <2 x i32> zeroinitializer
  %94 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0x3FE3F3A0E0000000, float 0x3FE904C380000000>, <2 x float> %2)
  store <2 x float> %94, ptr %85, align 4, !tbaa !22
  %95 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x3FECB91F40000000)
  store <2 x float> %95, ptr %86, align 4
  %96 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %96, ptr %20, align 4
  %97 = call i64 @b2CreateCapsuleShape(i64 %96, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %98 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0xBFCC7B9100000000, float 0x3FEF329C00000000>, <2 x float> %2)
  store <2 x float> %98, ptr %85, align 4, !tbaa !22
  %99 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x3FFCB91F40000000)
  store <2 x float> %99, ptr %86, align 4
  %100 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %100, ptr %28, align 4
  %101 = call i64 @b2CreateCapsuleShape(i64 %100, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %102 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0xBFECD4BCC0000000, float 0x3FDBC4BFC0000000>, <2 x float> %2)
  store <2 x float> %102, ptr %85, align 4, !tbaa !22
  %103 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x40058AD780000000)
  store <2 x float> %103, ptr %86, align 4
  %104 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %104, ptr %36, align 4
  %105 = call i64 @b2CreateCapsuleShape(i64 %104, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %106 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0xBFECD4BCA0000000, float 0xBFDBC4C060000000>, <2 x float> %2)
  store <2 x float> %106, ptr %85, align 4, !tbaa !22
  %107 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x400CB91F40000000)
  store <2 x float> %107, ptr %86, align 4
  %108 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %108, ptr %44, align 4
  %109 = call i64 @b2CreateCapsuleShape(i64 %108, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %110 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0xBFCC7B9180000000, float 0xBFEF329C00000000>, <2 x float> %2)
  store <2 x float> %110, ptr %85, align 4, !tbaa !22
  %111 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x4011F3B380000000)
  store <2 x float> %111, ptr %86, align 4
  %112 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %112, ptr %52, align 4
  %113 = call i64 @b2CreateCapsuleShape(i64 %112, ptr noundef nonnull %10, ptr noundef nonnull %8)
  %114 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %93, <2 x float> <float 0x3FE3F3A0A0000000, float 0xBFE904C3C0000000>, <2 x float> %2)
  store <2 x float> %114, ptr %85, align 4, !tbaa !22
  %115 = call <2 x float> @_Z9b2MakeRotf(float noundef 0x40158AD760000000)
  store <2 x float> %115, ptr %86, align 4
  %116 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9)
  store i64 %116, ptr %60, align 4
  %117 = call i64 @b2CreateCapsuleShape(i64 %116, ptr noundef nonnull %10, ptr noundef nonnull %8)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #8
  call void @b2DefaultWeldJointDef(ptr dead_on_unwind nonnull writable sret(%struct.b2WeldJointDef) align 8 %11)
  %118 = getelementptr inbounds i8, ptr %11, i64 40
  store float 5.000000e+00, ptr %118, align 8, !tbaa !36
  %119 = getelementptr inbounds i8, ptr %11, i64 48
  store float 0.000000e+00, ptr %119, align 8, !tbaa !38
  %120 = getelementptr inbounds i8, ptr %11, i64 16
  store float 0.000000e+00, ptr %120, align 8, !tbaa !22
  %.sroa.417.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 20
  %121 = extractelement <2 x float> %79, i64 0
  store float %121, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !22
  %122 = getelementptr inbounds i8, ptr %11, i64 24
  store float 0.000000e+00, ptr %122, align 8, !tbaa !22
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 28
  store float %74, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !22
  %.sroa.012.0.copyload = load i64, ptr %60, align 4
  %123 = getelementptr inbounds i8, ptr %11, i64 8
  %124 = getelementptr inbounds i8, ptr %11, i64 32
  store i64 %.sroa.012.0.copyload, ptr %11, align 8
  %125 = load i64, ptr %0, align 4
  store i64 %125, ptr %123, align 8
  %126 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload)
  %.sroa.04.0.copyload = load i64, ptr %0, align 4
  %127 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload)
  %128 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %127, <2 x float> %126)
  store float %128, ptr %124, align 8, !tbaa !39
  %129 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %129, ptr %15, align 4
  %.sroa.012.0.copyload14 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14, ptr %11, align 8
  %130 = load i64, ptr %20, align 4
  store i64 %130, ptr %123, align 8
  %131 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14)
  %.sroa.04.0.copyload.1 = load i64, ptr %20, align 4
  %132 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.1)
  %133 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %132, <2 x float> %131)
  store float %133, ptr %124, align 8, !tbaa !39
  %134 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %134, ptr %24, align 4
  %.sroa.012.0.copyload14.1 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14.1, ptr %11, align 8
  %135 = load i64, ptr %28, align 4
  store i64 %135, ptr %123, align 8
  %136 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14.1)
  %.sroa.04.0.copyload.2 = load i64, ptr %28, align 4
  %137 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.2)
  %138 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %137, <2 x float> %136)
  store float %138, ptr %124, align 8, !tbaa !39
  %139 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %139, ptr %32, align 4
  %.sroa.012.0.copyload14.2 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14.2, ptr %11, align 8
  %140 = load i64, ptr %36, align 4
  store i64 %140, ptr %123, align 8
  %141 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14.2)
  %.sroa.04.0.copyload.3 = load i64, ptr %36, align 4
  %142 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.3)
  %143 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %142, <2 x float> %141)
  store float %143, ptr %124, align 8, !tbaa !39
  %144 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %144, ptr %40, align 4
  %.sroa.012.0.copyload14.3 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14.3, ptr %11, align 8
  %145 = load i64, ptr %44, align 4
  store i64 %145, ptr %123, align 8
  %146 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14.3)
  %.sroa.04.0.copyload.4 = load i64, ptr %44, align 4
  %147 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.4)
  %148 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %147, <2 x float> %146)
  store float %148, ptr %124, align 8, !tbaa !39
  %149 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %149, ptr %48, align 4
  %.sroa.012.0.copyload14.4 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14.4, ptr %11, align 8
  %150 = load i64, ptr %52, align 4
  store i64 %150, ptr %123, align 8
  %151 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14.4)
  %.sroa.04.0.copyload.5 = load i64, ptr %52, align 4
  %152 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.5)
  %153 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %152, <2 x float> %151)
  store float %153, ptr %124, align 8, !tbaa !39
  %154 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %154, ptr %56, align 4
  %.sroa.012.0.copyload14.5 = load i64, ptr %123, align 8
  store i64 %.sroa.012.0.copyload14.5, ptr %11, align 8
  %155 = load i64, ptr %60, align 4
  store i64 %155, ptr %123, align 8
  %156 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.012.0.copyload14.5)
  %.sroa.04.0.copyload.6 = load i64, ptr %60, align 4
  %157 = call <2 x float> @b2Body_GetRotation(i64 %.sroa.04.0.copyload.6)
  %158 = call noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float> %157, <2 x float> %156)
  store float %158, ptr %124, align 8, !tbaa !39
  %159 = call i64 @b2CreateWeldJoint(i32 %1, ptr noundef nonnull %11)
  store i64 %159, ptr %64, align 4
  store i8 1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %8) #8
  ret void

160:                                              ; preds = %59, %51, %43, %35, %27, %19, %.preheader
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 28, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #7
  unreachable

161:                                              ; preds = %.preheader
  %162 = load i32, ptr %15, align 4, !tbaa !16
  %163 = icmp eq i32 %162, 0
  br i1 %163, label %19, label %164

164:                                              ; preds = %63, %55, %47, %39, %31, %23, %161
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 29, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5Donut6CreateE9b2WorldId6b2Vec2fibPv) #7
  unreachable
}

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

declare void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8) local_unnamed_addr #3

declare void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_Z9b2MakeRotf(float noundef) local_unnamed_addr #5

declare i64 @b2CreateBody(i32, ptr noundef) local_unnamed_addr #3

declare i64 @b2CreateCapsuleShape(i64, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @b2DefaultWeldJointDef(ptr dead_on_unwind writable sret(%struct.b2WeldJointDef) align 8) local_unnamed_addr #3

declare <2 x float> @b2Body_GetRotation(i64) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_Z15b2RelativeAngle5b2RotS_(<2 x float>, <2 x float>) local_unnamed_addr #5

declare i64 @b2CreateWeldJoint(i32, ptr noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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, !9, i64 112}
!6 = !{!"_ZTS5Donut", !7, i64 0, !7, i64 56, !9, i64 112}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"bool", !7, i64 0}
!10 = !{i8 0, i8 2}
!11 = !{}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTS8b2BodyId", !14, i64 0, !15, i64 4, !15, i64 6}
!14 = !{!"int", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !14, i64 0}
!17 = !{!"_ZTS9b2JointId", !14, i64 0, !15, i64 4, !15, i64 6}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTS6b2Vec2", !20, i64 0, !20, i64 4}
!20 = !{!"float", !7, i64 0}
!21 = !{!19, !20, i64 4}
!22 = !{!20, !20, i64 0}
!23 = !{!24, !25, i64 0}
!24 = !{!"_ZTS9b2BodyDef", !25, i64 0, !19, i64 4, !26, i64 12, !19, i64 20, !20, i64 28, !20, i64 32, !20, i64 36, !20, i64 40, !20, i64 44, !27, i64 48, !27, i64 56, !9, i64 64, !9, i64 65, !9, i64 66, !9, i64 67, !9, i64 68, !9, i64 69, !14, i64 72}
!25 = !{!"_ZTS10b2BodyType", !7, i64 0}
!26 = !{!"_ZTS5b2Rot", !20, i64 0, !20, i64 4}
!27 = !{!"any pointer", !7, i64 0}
!28 = !{!24, !27, i64 56}
!29 = !{!30, !9, i64 65}
!30 = !{!"_ZTS10b2ShapeDef", !27, i64 0, !31, i64 8, !20, i64 32, !32, i64 40, !9, i64 64, !9, i64 65, !9, i64 66, !9, i64 67, !9, i64 68, !9, i64 69, !9, i64 70, !14, i64 72}
!31 = !{!"_ZTS17b2SurfaceMaterial", !20, i64 0, !20, i64 4, !20, i64 8, !20, i64 12, !14, i64 16, !14, i64 20}
!32 = !{!"_ZTS8b2Filter", !33, i64 0, !33, i64 8, !14, i64 16}
!33 = !{!"long", !7, i64 0}
!34 = !{!30, !14, i64 56}
!35 = !{!30, !20, i64 8}
!36 = !{!37, !20, i64 40}
!37 = !{!"_ZTS14b2WeldJointDef", !13, i64 0, !13, i64 8, !19, i64 16, !19, i64 24, !20, i64 32, !20, i64 36, !20, i64 40, !20, i64 44, !20, i64 48, !9, i64 52, !27, i64 56, !14, i64 64}
!38 = !{!37, !20, i64 48}
!39 = !{!37, !20, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass