; LLVM IR from erincatto/box2d :: shared (determinism)

; 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.b2BodyId = type { i32, i16, i16 }
%struct.FallingHingeData = type { ptr, i32, i32, i32, i32 }
%struct.b2WorldId = type { i16, i16 }
%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.b2Vec2 = type { float, float }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%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.b2ShapeId = type { i32, i16, i16 }
%struct.b2RevoluteJointDef = type { %struct.b2BodyId, %struct.b2BodyId, %struct.b2Vec2, %struct.b2Vec2, float, i8, float, float, i8, float, float, i8, float, float, float, i8, ptr, i32 }
%struct.b2JointId = type { i32, i16, i16 }

@b2_nullBodyId = external hidden constant %struct.b2BodyId, align 4
@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__.CreateFallingHinges = external hidden unnamed_addr constant [48 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @CreateFallingHinges(ptr dead_on_unwind noalias writable sret(%struct.FallingHingeData) align 8 %0, i32 %1) #0 {
  %3 = alloca %struct.b2WorldId, align 2
  %4 = alloca %struct.b2BodyDef, align 8
  %5 = alloca %struct.b2Vec2, align 4
  %6 = alloca %struct.b2BodyId, align 4
  %7 = alloca %struct.b2Polygon, align 4
  %8 = alloca %struct.b2ShapeDef, align 8
  %9 = alloca %struct.b2ShapeId, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca %struct.b2Polygon, align 4
  %17 = alloca %struct.b2ShapeDef, align 8
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.b2RevoluteJointDef, align 8
  %22 = alloca %struct.b2Vec2, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca float, align 4
  %28 = alloca %struct.b2BodyId, align 4
  %29 = alloca i32, align 4
  %30 = alloca %struct.b2BodyDef, align 8
  %31 = alloca %struct.b2Rot, align 4
  %32 = alloca %struct.b2BodyId, align 4
  %33 = alloca %struct.b2JointId, align 4
  %34 = alloca %struct.b2ShapeId, align 4
  store i32 %1, ptr %3, align 2
  call void @llvm.lifetime.start.p0(i64 80, ptr %4) #9
  call void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8 %4)
  %35 = getelementptr inbounds %struct.b2BodyDef, ptr %4, i32 0, i32 1
  %36 = getelementptr inbounds %struct.b2Vec2, ptr %5, i32 0, i32 0
  store float 0.000000e+00, ptr %36, align 4, !tbaa !5
  %37 = getelementptr inbounds %struct.b2Vec2, ptr %5, i32 0, i32 1
  store float -1.000000e+00, ptr %37, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %38 = load i32, ptr %3, align 2
  %39 = call i64 @b2CreateBody(i32 %38, ptr noundef %4)
  store i64 %39, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 144, ptr %7) #9
  call void @b2MakeBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %7, float noundef 2.000000e+01, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #9
  call void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8 %8)
  %40 = load i64, ptr %6, align 4
  %41 = call i64 @b2CreatePolygonShape(i64 %40, ptr noundef %8, ptr noundef %7)
  store i64 %41, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 4, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 30, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %42 = load i32, ptr %11, align 4, !tbaa !13
  %43 = load i32, ptr %10, align 4, !tbaa !13
  %44 = mul nsw i32 %42, %43
  store i32 %44, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %45 = load i32, ptr %12, align 4, !tbaa !13
  %46 = sext i32 %45 to i64
  %47 = call noalias ptr @calloc(i64 noundef %46, i64 noundef 8) #10
  store ptr %47, ptr %13, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store float 2.500000e-01, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %48 = load float, ptr %14, align 4, !tbaa !12
  %49 = fmul float 0x3FB99999A0000000, %48
  store float %49, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 144, ptr %16) #9
  %50 = load float, ptr %14, align 4, !tbaa !12
  %51 = load float, ptr %15, align 4, !tbaa !12
  %52 = fsub float %50, %51
  %53 = load float, ptr %14, align 4, !tbaa !12
  %54 = load float, ptr %15, align 4, !tbaa !12
  %55 = fsub float %53, %54
  %56 = load float, ptr %15, align 4, !tbaa !12
  call void @b2MakeRoundedBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %16, float noundef %52, float noundef %55, float noundef %56)
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #9
  call void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8 %17)
  %57 = getelementptr inbounds %struct.b2ShapeDef, ptr %17, i32 0, i32 1
  %58 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %57, i32 0, i32 0
  store float 0x3FD3333340000000, ptr %58, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %59 = load float, ptr %14, align 4, !tbaa !12
  %60 = fmul float 0x3FD99999A0000000, %59
  store float %60, ptr %18, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %61 = load float, ptr %14, align 4, !tbaa !12
  %62 = fmul float 1.000000e+01, %61
  store float %62, ptr %19, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %63 = load float, ptr %19, align 4, !tbaa !12
  %64 = fmul float -5.000000e-01, %63
  %65 = load i32, ptr %10, align 4, !tbaa !13
  %66 = sitofp i32 %65 to float
  %67 = fsub float %66, 1.000000e+00
  %68 = fmul float %64, %67
  store float %68, ptr %20, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 96, ptr %21) #9
  call void @b2DefaultRevoluteJointDef(ptr dead_on_unwind writable sret(%struct.b2RevoluteJointDef) align 8 %21)
  %69 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 8
  store i8 1, ptr %69, align 8, !tbaa !23
  %70 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 9
  store float 0xBFD41B2F80000000, ptr %70, align 4, !tbaa !27
  %71 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 10
  store float 0x3FE41B2F80000000, ptr %71, align 8, !tbaa !28
  %72 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 5
  store i8 1, ptr %72, align 4, !tbaa !29
  %73 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 6
  store float 5.000000e-01, ptr %73, align 8, !tbaa !30
  %74 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 7
  store float 5.000000e-01, ptr %74, align 4, !tbaa !31
  %75 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 2
  %76 = getelementptr inbounds %struct.b2Vec2, ptr %22, i32 0, i32 0
  %77 = load float, ptr %14, align 4, !tbaa !12
  store float %77, ptr %76, align 4, !tbaa !5
  %78 = getelementptr inbounds %struct.b2Vec2, ptr %22, i32 0, i32 1
  %79 = load float, ptr %14, align 4, !tbaa !12
  store float %79, ptr %78, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %75, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !11
  %80 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 3
  %81 = getelementptr inbounds %struct.b2Vec2, ptr %23, i32 0, i32 0
  %82 = load float, ptr %18, align 4, !tbaa !12
  store float %82, ptr %81, align 4, !tbaa !5
  %83 = getelementptr inbounds %struct.b2Vec2, ptr %23, i32 0, i32 1
  %84 = load float, ptr %14, align 4, !tbaa !12
  %85 = fneg float %84
  store float %85, ptr %83, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %80, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !11
  %86 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 14
  store float 0x3FB99999A0000000, ptr %86, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !13
  br label %87

87:                                               ; preds = %155, %2
  %88 = load i32, ptr %25, align 4, !tbaa !13
  %89 = load i32, ptr %10, align 4, !tbaa !13
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 2, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %158

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %93 = load float, ptr %20, align 4, !tbaa !12
  %94 = load i32, ptr %25, align 4, !tbaa !13
  %95 = sitofp i32 %94 to float
  %96 = load float, ptr %19, align 4, !tbaa !12
  %97 = call float @llvm.fmuladd.f32(float %95, float %96, float %93)
  store float %97, ptr %27, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  call void @llvm.memset.p0.i64(ptr align 4 %28, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !13
  br label %98

98:                                               ; preds = %151, %92
  %99 = load i32, ptr %29, align 4, !tbaa !13
  %100 = load i32, ptr %11, align 4, !tbaa !13
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 5, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %154

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 80, ptr %30) #9
  call void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8 %30)
  %104 = getelementptr inbounds %struct.b2BodyDef, ptr %30, i32 0, i32 0
  store i32 2, ptr %104, align 8, !tbaa !33
  %105 = load float, ptr %27, align 4, !tbaa !12
  %106 = load float, ptr %18, align 4, !tbaa !12
  %107 = load i32, ptr %29, align 4, !tbaa !13
  %108 = sitofp i32 %107 to float
  %109 = call float @llvm.fmuladd.f32(float %106, float %108, float %105)
  %110 = getelementptr inbounds %struct.b2BodyDef, ptr %30, i32 0, i32 1
  %111 = getelementptr inbounds %struct.b2Vec2, ptr %110, i32 0, i32 0
  store float %109, ptr %111, align 4, !tbaa !36
  %112 = load float, ptr %14, align 4, !tbaa !12
  %113 = load float, ptr %14, align 4, !tbaa !12
  %114 = fmul float 2.000000e+00, %113
  %115 = load i32, ptr %29, align 4, !tbaa !13
  %116 = sitofp i32 %115 to float
  %117 = call float @llvm.fmuladd.f32(float %114, float %116, float %112)
  %118 = getelementptr inbounds %struct.b2BodyDef, ptr %30, i32 0, i32 1
  %119 = getelementptr inbounds %struct.b2Vec2, ptr %118, i32 0, i32 1
  store float %117, ptr %119, align 4, !tbaa !37
  %120 = getelementptr inbounds %struct.b2BodyDef, ptr %30, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %121 = load i32, ptr %29, align 4, !tbaa !13
  %122 = sitofp i32 %121 to float
  %123 = call float @llvm.fmuladd.f32(float 0x3FB99999A0000000, float %122, float -1.000000e+00)
  %124 = call <2 x float> @b2MakeRot(float noundef %123)
  store <2 x float> %124, ptr %31, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %120, ptr align 4 %31, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %125 = load i32, ptr %3, align 2
  %126 = call i64 @b2CreateBody(i32 %125, ptr noundef %30)
  store i64 %126, ptr %32, align 4
  %127 = load i32, ptr %29, align 4, !tbaa !13
  %128 = and i32 %127, 1
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !38
  br label %136

131:                                              ; preds = %103
  %132 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %132, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !38
  %133 = getelementptr inbounds %struct.b2RevoluteJointDef, ptr %21, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %133, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !38
  %134 = load i32, ptr %3, align 2
  %135 = call i64 @b2CreateRevoluteJoint(i32 %134, ptr noundef %21)
  store i64 %135, ptr %33, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 @b2_nullBodyId, i64 8, i1 false), !tbaa.struct !38
  br label %136

136:                                              ; preds = %131, %130
  %137 = load i64, ptr %32, align 4
  %138 = call i64 @b2CreatePolygonShape(i64 %137, ptr noundef %17, ptr noundef %16)
  store i64 %138, ptr %34, align 4
  %139 = load i32, ptr %24, align 4, !tbaa !13
  %140 = load i32, ptr %12, align 4, !tbaa !13
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %136
  br label %144

143:                                              ; preds = %136
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__.CreateFallingHinges) #11
  unreachable

144:                                              ; preds = %142
  %145 = load ptr, ptr %13, align 8, !tbaa !15
  %146 = load i32, ptr %24, align 4, !tbaa !13
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds %struct.b2BodyId, ptr %145, i64 %147
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 4 %32, i64 8, i1 false), !tbaa.struct !38
  %149 = load i32, ptr %24, align 4, !tbaa !13
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %24, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %30) #9
  br label %151

151:                                              ; preds = %144
  %152 = load i32, ptr %29, align 4, !tbaa !13
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %29, align 4, !tbaa !13
  br label %98, !llvm.loop !40

154:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %25, align 4, !tbaa !13
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %25, align 4, !tbaa !13
  br label %87, !llvm.loop !42

158:                                              ; preds = %91
  %159 = load i32, ptr %24, align 4, !tbaa !13
  %160 = load i32, ptr %12, align 4, !tbaa !13
  %161 = icmp eq i32 %159, %160
  br i1 %161, label %162, label %163

162:                                              ; preds = %158
  br label %164

163:                                              ; preds = %158
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 93, ptr noundef @__PRETTY_FUNCTION__.CreateFallingHinges) #11
  unreachable

164:                                              ; preds = %162
  %165 = getelementptr inbounds %struct.FallingHingeData, ptr %0, i32 0, i32 0
  %166 = load ptr, ptr %13, align 8, !tbaa !15
  store ptr %166, ptr %165, align 8, !tbaa !43
  %167 = getelementptr inbounds %struct.FallingHingeData, ptr %0, i32 0, i32 1
  %168 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %168, ptr %167, align 8, !tbaa !45
  %169 = getelementptr inbounds %struct.FallingHingeData, ptr %0, i32 0, i32 2
  store i32 0, ptr %169, align 4, !tbaa !46
  %170 = getelementptr inbounds %struct.FallingHingeData, ptr %0, i32 0, i32 3
  store i32 -1, ptr %170, align 8, !tbaa !47
  %171 = getelementptr inbounds %struct.FallingHingeData, ptr %0, i32 0, i32 4
  store i32 0, ptr %171, align 4, !tbaa !48
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  ret void
}

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

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

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

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

declare void @b2MakeBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4, float noundef, float noundef) #2

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

declare i64 @b2CreatePolygonShape(i64, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

declare void @b2MakeRoundedBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4, float noundef, float noundef, float noundef) #2

declare void @b2DefaultRevoluteJointDef(ptr dead_on_unwind writable sret(%struct.b2RevoluteJointDef) align 8) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

declare i64 @b2CreateRevoluteJoint(i32, ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0,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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0,1) }
attributes #11 = { noreturn 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 0}
!6 = !{!"b2Vec2", !7, i64 0, !7, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!18, !7, i64 8}
!18 = !{!"b2ShapeDef", !16, i64 0, !19, i64 8, !7, i64 32, !20, i64 40, !22, i64 64, !22, i64 65, !22, i64 66, !22, i64 67, !22, i64 68, !22, i64 69, !22, i64 70, !14, i64 72}
!19 = !{!"b2SurfaceMaterial", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !14, i64 16, !14, i64 20}
!20 = !{!"b2Filter", !21, i64 0, !21, i64 8, !14, i64 16}
!21 = !{!"long", !8, i64 0}
!22 = !{!"_Bool", !8, i64 0}
!23 = !{!24, !22, i64 48}
!24 = !{!"b2RevoluteJointDef", !25, i64 0, !25, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !22, i64 36, !7, i64 40, !7, i64 44, !22, i64 48, !7, i64 52, !7, i64 56, !22, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !22, i64 76, !16, i64 80, !14, i64 88}
!25 = !{!"b2BodyId", !14, i64 0, !26, i64 4, !26, i64 6}
!26 = !{!"short", !8, i64 0}
!27 = !{!24, !7, i64 52}
!28 = !{!24, !7, i64 56}
!29 = !{!24, !22, i64 36}
!30 = !{!24, !7, i64 40}
!31 = !{!24, !7, i64 44}
!32 = !{!24, !7, i64 72}
!33 = !{!34, !14, i64 0}
!34 = !{!"b2BodyDef", !14, i64 0, !6, i64 4, !35, i64 12, !6, i64 20, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !16, i64 48, !16, i64 56, !22, i64 64, !22, i64 65, !22, i64 66, !22, i64 67, !22, i64 68, !22, i64 69, !14, i64 72}
!35 = !{!"b2Rot", !7, i64 0, !7, i64 4}
!36 = !{!34, !7, i64 4}
!37 = !{!34, !7, i64 8}
!38 = !{i64 0, i64 4, !13, i64 4, i64 2, !39, i64 6, i64 2, !39}
!39 = !{!26, !26, i64 0}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = distinct !{!42, !41}
!43 = !{!44, !16, i64 0}
!44 = !{!"FallingHingeData", !16, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!45 = !{!44, !14, i64 8}
!46 = !{!44, !14, i64 12}
!47 = !{!44, !14, i64 16}
!48 = !{!44, !14, i64 20}


; 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.b2BodyId = type { i32, i16, i16 }
%struct.FallingHingeData = type { ptr, i32, i32, i32, i32 }
%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.b2Vec2 = type { float, float }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%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.b2RevoluteJointDef = type { %struct.b2BodyId, %struct.b2BodyId, %struct.b2Vec2, %struct.b2Vec2, float, i8, float, float, i8, float, float, i8, float, float, float, i8, ptr, i32 }

@b2_nullBodyId = external hidden local_unnamed_addr constant %struct.b2BodyId, align 4

; Function Attrs: nounwind uwtable
define dso_local void @CreateFallingHinges(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.FallingHingeData) align 8 %0, i32 %1) local_unnamed_addr #0 {
  %3 = alloca %struct.b2BodyDef, align 8
  %4 = alloca %struct.b2Polygon, align 4
  %5 = alloca %struct.b2ShapeDef, align 8
  %6 = alloca %struct.b2Polygon, align 4
  %7 = alloca %struct.b2ShapeDef, align 8
  %8 = alloca %struct.b2RevoluteJointDef, align 8
  %9 = alloca %struct.b2BodyDef, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %3) #7
  %10 = getelementptr inbounds i8, ptr %3, i64 4
  store <2 x float> <float 0.000000e+00, float -1.000000e+00>, ptr %10, align 4, !tbaa !5
  %11 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #7
  call void @b2MakeBox(ptr dead_on_unwind nonnull writable sret(%struct.b2Polygon) align 4 %4, float noundef 2.000000e+01, float noundef 1.000000e+00) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  call void @b2DefaultShapeDef(ptr dead_on_unwind nonnull writable sret(%struct.b2ShapeDef) align 8 %5) #7
  %12 = call i64 @b2CreatePolygonShape(i64 %11, ptr noundef nonnull %5, ptr noundef nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #7
  %13 = call noalias dereferenceable_or_null(960) ptr @calloc(i64 noundef 120, i64 noundef 8) #8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %6) #7
  call void @b2MakeRoundedBox(ptr dead_on_unwind nonnull writable sret(%struct.b2Polygon) align 4 %6, float noundef 0x3FCCCCCCC0000000, float noundef 0x3FCCCCCCC0000000, float noundef 0x3F999999A0000000) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #7
  call void @b2DefaultShapeDef(ptr dead_on_unwind nonnull writable sret(%struct.b2ShapeDef) align 8 %7) #7
  %14 = getelementptr inbounds i8, ptr %7, i64 8
  store float 0x3FD3333340000000, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %8) #7
  call void @b2DefaultRevoluteJointDef(ptr dead_on_unwind nonnull writable sret(%struct.b2RevoluteJointDef) align 8 %8) #7
  %15 = getelementptr inbounds i8, ptr %8, i64 48
  store i8 1, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %8, i64 52
  store <2 x float> <float 0xBFD41B2F80000000, float 0x3FE41B2F80000000>, ptr %16, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %8, i64 36
  store i8 1, ptr %17, align 4, !tbaa !22
  %18 = getelementptr inbounds i8, ptr %8, i64 40
  store <2 x float> <float 5.000000e-01, float 5.000000e-01>, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %8, i64 16
  store <4 x float> <float 2.500000e-01, float 2.500000e-01, float 0x3FB99999A0000000, float -2.500000e-01>, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %8, i64 72
  store float 0x3FB99999A0000000, ptr %20, align 8, !tbaa !23
  %21 = getelementptr inbounds i8, ptr %9, i64 4
  %22 = getelementptr inbounds i8, ptr %9, i64 12
  %23 = getelementptr inbounds i8, ptr %8, i64 8
  %.sroa.011.0.copyload12 = load i64, ptr @b2_nullBodyId, align 4
  br label %69

.preheader77:                                     ; preds = %81, %35
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %35 ], [ 30, %81 ]
  %.sroa.011.164.1 = phi i64 [ %.sroa.011.2.1, %35 ], [ 0, %81 ]
  %.06063.1 = phi i32 [ %38, %35 ], [ 0, %81 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %9) #7
  store i32 2, ptr %9, align 8, !tbaa !24
  %24 = uitofp nneg i32 %.06063.1 to float
  %25 = insertelement <2 x float> poison, float %24, i64 0
  %26 = shufflevector <2 x float> %25, <2 x float> poison, <2 x i32> zeroinitializer
  %27 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %26, <2 x float> <float 0x3FB99999A0000000, float 5.000000e-01>, <2 x float> <float -1.250000e+00, float 2.500000e-01>)
  store <2 x float> %27, ptr %21, align 4, !tbaa !5
  %28 = call float @llvm.fmuladd.f32(float %24, float 0x3FB99999A0000000, float -1.000000e+00)
  %29 = call <2 x float> @b2MakeRot(float noundef %28)
  store <2 x float> %29, ptr %22, align 4
  %30 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9) #7
  %31 = and i32 %.06063.1, 1
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %35, label %33

33:                                               ; preds = %.preheader77
  store i64 %.sroa.011.164.1, ptr %8, align 8
  store i64 %30, ptr %23, align 8
  %34 = call i64 @b2CreateRevoluteJoint(i32 %1, ptr noundef nonnull %8) #7
  br label %35

35:                                               ; preds = %.preheader77, %33
  %.sroa.011.2.1 = phi i64 [ %.sroa.011.0.copyload12, %33 ], [ %30, %.preheader77 ]
  %36 = call i64 @b2CreatePolygonShape(i64 %30, ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %37 = getelementptr inbounds %struct.b2BodyId, ptr %13, i64 %indvars.iv.1
  store i64 %30, ptr %37, align 4
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  %38 = add nuw nsw i32 %.06063.1, 1
  %exitcond69.1.not = icmp eq i32 %38, 30
  br i1 %exitcond69.1.not, label %.preheader76, label %.preheader77, !llvm.loop !27

.preheader76:                                     ; preds = %35, %50
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %50 ], [ 60, %35 ]
  %.sroa.011.164.2 = phi i64 [ %.sroa.011.2.2, %50 ], [ 0, %35 ]
  %.06063.2 = phi i32 [ %53, %50 ], [ 0, %35 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %9) #7
  store i32 2, ptr %9, align 8, !tbaa !24
  %39 = uitofp nneg i32 %.06063.2 to float
  %40 = insertelement <2 x float> poison, float %39, i64 0
  %41 = shufflevector <2 x float> %40, <2 x float> poison, <2 x i32> zeroinitializer
  %42 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %41, <2 x float> <float 0x3FB99999A0000000, float 5.000000e-01>, <2 x float> <float 1.250000e+00, float 2.500000e-01>)
  store <2 x float> %42, ptr %21, align 4, !tbaa !5
  %43 = call float @llvm.fmuladd.f32(float %39, float 0x3FB99999A0000000, float -1.000000e+00)
  %44 = call <2 x float> @b2MakeRot(float noundef %43)
  store <2 x float> %44, ptr %22, align 4
  %45 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9) #7
  %46 = and i32 %.06063.2, 1
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %50, label %48

48:                                               ; preds = %.preheader76
  store i64 %.sroa.011.164.2, ptr %8, align 8
  store i64 %45, ptr %23, align 8
  %49 = call i64 @b2CreateRevoluteJoint(i32 %1, ptr noundef nonnull %8) #7
  br label %50

50:                                               ; preds = %.preheader76, %48
  %.sroa.011.2.2 = phi i64 [ %.sroa.011.0.copyload12, %48 ], [ %45, %.preheader76 ]
  %51 = call i64 @b2CreatePolygonShape(i64 %45, ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %52 = getelementptr inbounds %struct.b2BodyId, ptr %13, i64 %indvars.iv.2
  store i64 %45, ptr %52, align 4
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  %53 = add nuw nsw i32 %.06063.2, 1
  %exitcond69.2.not = icmp eq i32 %53, 30
  br i1 %exitcond69.2.not, label %.preheader, label %.preheader76, !llvm.loop !27

.preheader:                                       ; preds = %50, %65
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %65 ], [ 90, %50 ]
  %.sroa.011.164.3 = phi i64 [ %.sroa.011.2.3, %65 ], [ 0, %50 ]
  %.06063.3 = phi i32 [ %68, %65 ], [ 0, %50 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %9) #7
  store i32 2, ptr %9, align 8, !tbaa !24
  %54 = uitofp nneg i32 %.06063.3 to float
  %55 = insertelement <2 x float> poison, float %54, i64 0
  %56 = shufflevector <2 x float> %55, <2 x float> poison, <2 x i32> zeroinitializer
  %57 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %56, <2 x float> <float 0x3FB99999A0000000, float 5.000000e-01>, <2 x float> <float 3.750000e+00, float 2.500000e-01>)
  store <2 x float> %57, ptr %21, align 4, !tbaa !5
  %58 = call float @llvm.fmuladd.f32(float %54, float 0x3FB99999A0000000, float -1.000000e+00)
  %59 = call <2 x float> @b2MakeRot(float noundef %58)
  store <2 x float> %59, ptr %22, align 4
  %60 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9) #7
  %61 = and i32 %.06063.3, 1
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %65, label %63

63:                                               ; preds = %.preheader
  store i64 %.sroa.011.164.3, ptr %8, align 8
  store i64 %60, ptr %23, align 8
  %64 = call i64 @b2CreateRevoluteJoint(i32 %1, ptr noundef nonnull %8) #7
  br label %65

65:                                               ; preds = %.preheader, %63
  %.sroa.011.2.3 = phi i64 [ %.sroa.011.0.copyload12, %63 ], [ %60, %.preheader ]
  %66 = call i64 @b2CreatePolygonShape(i64 %60, ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %67 = getelementptr inbounds %struct.b2BodyId, ptr %13, i64 %indvars.iv.3
  store i64 %60, ptr %67, align 4
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  %68 = add nuw nsw i32 %.06063.3, 1
  %exitcond69.3.not = icmp eq i32 %68, 30
  br i1 %exitcond69.3.not, label %84, label %.preheader, !llvm.loop !27

69:                                               ; preds = %2, %81
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %81 ]
  %.sroa.011.164 = phi i64 [ 0, %2 ], [ %.sroa.011.2, %81 ]
  %indvars74 = trunc i64 %indvars.iv to i32
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %9) #7
  store i32 2, ptr %9, align 8, !tbaa !24
  %70 = uitofp nneg i32 %indvars74 to float
  %71 = insertelement <2 x float> poison, float %70, i64 0
  %72 = shufflevector <2 x float> %71, <2 x float> poison, <2 x i32> zeroinitializer
  %73 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %72, <2 x float> <float 0x3FB99999A0000000, float 5.000000e-01>, <2 x float> <float -3.750000e+00, float 2.500000e-01>)
  store <2 x float> %73, ptr %21, align 4, !tbaa !5
  %74 = call float @llvm.fmuladd.f32(float %70, float 0x3FB99999A0000000, float -1.000000e+00)
  %75 = call <2 x float> @b2MakeRot(float noundef %74)
  store <2 x float> %75, ptr %22, align 4
  %76 = call i64 @b2CreateBody(i32 %1, ptr noundef nonnull %9) #7
  %77 = and i32 %indvars74, 1
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %81, label %79

79:                                               ; preds = %69
  store i64 %.sroa.011.164, ptr %8, align 8
  store i64 %76, ptr %23, align 8
  %80 = call i64 @b2CreateRevoluteJoint(i32 %1, ptr noundef nonnull %8) #7
  br label %81

81:                                               ; preds = %79, %69
  %.sroa.011.2 = phi i64 [ %.sroa.011.0.copyload12, %79 ], [ %76, %69 ]
  %82 = call i64 @b2CreatePolygonShape(i64 %76, ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %83 = getelementptr inbounds %struct.b2BodyId, ptr %13, i64 %indvars.iv
  store i64 %76, ptr %83, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #7
  %exitcond75.not = icmp eq i64 %indvars.iv.next, 30
  br i1 %exitcond75.not, label %.preheader77, label %69, !llvm.loop !27

84:                                               ; preds = %65
  store ptr %13, ptr %0, align 8, !tbaa !29
  %85 = getelementptr inbounds i8, ptr %0, i64 8
  store <4 x i32> <i32 120, i32 0, i32 -1, i32 0>, ptr %85, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %6) #7
  ret void
}

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

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

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

declare void @b2MakeBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4, float noundef, float noundef) local_unnamed_addr #2

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

declare i64 @b2CreatePolygonShape(i64, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

declare void @b2MakeRoundedBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4, float noundef, float noundef, float noundef) local_unnamed_addr #2

declare void @b2DefaultRevoluteJointDef(ptr dead_on_unwind writable sret(%struct.b2RevoluteJointDef) align 8) local_unnamed_addr #2

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

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

declare i64 @b2CreateRevoluteJoint(i32, ptr noundef) local_unnamed_addr #2

; 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 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"b2ShapeDef", !11, i64 0, !12, i64 8, !6, i64 32, !14, i64 40, !16, i64 64, !16, i64 65, !16, i64 66, !16, i64 67, !16, i64 68, !16, i64 69, !16, i64 70, !13, i64 72}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"b2SurfaceMaterial", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !13, i64 16, !13, i64 20}
!13 = !{!"int", !7, i64 0}
!14 = !{!"b2Filter", !15, i64 0, !15, i64 8, !13, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!18, !16, i64 48}
!18 = !{!"b2RevoluteJointDef", !19, i64 0, !19, i64 8, !21, i64 16, !21, i64 24, !6, i64 32, !16, i64 36, !6, i64 40, !6, i64 44, !16, i64 48, !6, i64 52, !6, i64 56, !16, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !16, i64 76, !11, i64 80, !13, i64 88}
!19 = !{!"b2BodyId", !13, i64 0, !20, i64 4, !20, i64 6}
!20 = !{!"short", !7, i64 0}
!21 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!22 = !{!18, !16, i64 36}
!23 = !{!18, !6, i64 72}
!24 = !{!25, !13, i64 0}
!25 = !{!"b2BodyDef", !13, i64 0, !21, i64 4, !26, i64 12, !21, i64 20, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !11, i64 48, !11, i64 56, !16, i64 64, !16, i64 65, !16, i64 66, !16, i64 67, !16, i64 68, !16, i64 69, !13, i64 72}
!26 = !{!"b2Rot", !6, i64 0, !6, i64 4}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !11, i64 0}
!30 = !{!"FallingHingeData", !11, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!31 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass