; LLVM IR from erincatto/box2d :: test (test_world)

; 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.b2WorldDef = type { %struct.b2Vec2, float, float, float, float, float, float, float, float, ptr, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, i32 }
%struct.b2Vec2 = type { float, float }
%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.b2BodyId = type { i32, i16, i16 }
%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 }

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.HelloWorld = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [67 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @HelloWorld() #0 {
  %1 = alloca %struct.b2WorldDef, align 8
  %2 = alloca %struct.b2Vec2, align 4
  %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 %struct.b2BodyDef, align 8
  %11 = alloca %struct.b2Vec2, align 4
  %12 = alloca %struct.b2BodyId, align 4
  %13 = alloca %struct.b2Polygon, align 4
  %14 = alloca %struct.b2ShapeDef, align 8
  %15 = alloca %struct.b2ShapeId, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.b2Vec2, align 4
  %19 = alloca %struct.b2Rot, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca %struct.b2Rot, align 4
  call void @llvm.lifetime.start.p0(i64 104, ptr %1) #7
  call void @b2DefaultWorldDef(ptr dead_on_unwind writable sret(%struct.b2WorldDef) align 8 %1)
  %23 = getelementptr inbounds %struct.b2WorldDef, ptr %1, i32 0, i32 0
  %24 = getelementptr inbounds %struct.b2Vec2, ptr %2, i32 0, i32 0
  store float 0.000000e+00, ptr %24, align 4, !tbaa !5
  %25 = getelementptr inbounds %struct.b2Vec2, ptr %2, i32 0, i32 1
  store float -1.000000e+01, ptr %25, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 4 %2, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %26 = call i32 @b2CreateWorld(ptr noundef %1)
  store i32 %26, ptr %3, align 2
  br label %27

27:                                               ; preds = %0
  %28 = load i32, ptr %3, align 2
  %29 = call zeroext i1 @b2World_IsValid(i32 %28)
  %30 = zext i1 %29 to i32
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %34

32:                                               ; preds = %27
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 26, ptr noundef @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

34:                                               ; preds = %27
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 80, ptr %4) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8 %4)
  %37 = getelementptr inbounds %struct.b2BodyDef, ptr %4, i32 0, i32 1
  %38 = getelementptr inbounds %struct.b2Vec2, ptr %5, i32 0, i32 0
  store float 0.000000e+00, ptr %38, align 4, !tbaa !5
  %39 = getelementptr inbounds %struct.b2Vec2, ptr %5, i32 0, i32 1
  store float -1.000000e+01, ptr %39, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %5, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %40 = load i32, ptr %3, align 2
  %41 = call i64 @b2CreateBody(i32 %40, ptr noundef %4)
  store i64 %41, ptr %6, align 4
  br label %42

42:                                               ; preds = %36
  %43 = load i64, ptr %6, align 4
  %44 = call zeroext i1 @b2Body_IsValid(i64 %43)
  %45 = zext i1 %44 to i32
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %42
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 36, ptr noundef @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

49:                                               ; preds = %42
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 144, ptr %7) #7
  call void @b2MakeBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %7, float noundef 5.000000e+01, float noundef 1.000000e+01)
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #7
  call void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8 %8)
  %52 = load i64, ptr %6, align 4
  %53 = call i64 @b2CreatePolygonShape(i64 %52, ptr noundef %8, ptr noundef %7)
  store i64 %53, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind writable sret(%struct.b2BodyDef) align 8 %10)
  %54 = getelementptr inbounds %struct.b2BodyDef, ptr %10, i32 0, i32 0
  store i32 2, ptr %54, align 8, !tbaa !13
  %55 = getelementptr inbounds %struct.b2BodyDef, ptr %10, i32 0, i32 1
  %56 = getelementptr inbounds %struct.b2Vec2, ptr %11, i32 0, i32 0
  store float 0.000000e+00, ptr %56, align 4, !tbaa !5
  %57 = getelementptr inbounds %struct.b2Vec2, ptr %11, i32 0, i32 1
  store float 4.000000e+00, ptr %57, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %58 = load i32, ptr %3, align 2
  %59 = call i64 @b2CreateBody(i32 %58, ptr noundef %10)
  store i64 %59, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 144, ptr %13) #7
  call void @b2MakeBox(ptr dead_on_unwind writable sret(%struct.b2Polygon) align 4 %13, float noundef 1.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #7
  call void @b2DefaultShapeDef(ptr dead_on_unwind writable sret(%struct.b2ShapeDef) align 8 %14)
  %60 = getelementptr inbounds %struct.b2ShapeDef, ptr %14, i32 0, i32 2
  store float 1.000000e+00, ptr %60, align 8, !tbaa !19
  %61 = getelementptr inbounds %struct.b2ShapeDef, ptr %14, i32 0, i32 1
  %62 = getelementptr inbounds %struct.b2SurfaceMaterial, ptr %61, i32 0, i32 0
  store float 0x3FD3333340000000, ptr %62, align 8, !tbaa !24
  %63 = load i64, ptr %12, align 4
  %64 = call i64 @b2CreatePolygonShape(i64 %63, ptr noundef %14, ptr noundef %13)
  store i64 %64, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store float 0x3F91111120000000, ptr %16, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 4, ptr %17, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %65 = load i64, ptr %12, align 4
  %66 = call <2 x float> @b2Body_GetPosition(i64 %65)
  store <2 x float> %66, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %67 = load i64, ptr %12, align 4
  %68 = call <2 x float> @b2Body_GetRotation(i64 %67)
  store <2 x float> %68, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !25
  br label %69

69:                                               ; preds = %81, %51
  %70 = load i32, ptr %20, align 4, !tbaa !25
  %71 = icmp slt i32 %70, 90
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %84

73:                                               ; preds = %69
  %74 = load float, ptr %16, align 4, !tbaa !12
  %75 = load i32, ptr %17, align 4, !tbaa !25
  %76 = load i32, ptr %3, align 2
  call void @b2World_Step(i32 %76, float noundef %74, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %77 = load i64, ptr %12, align 4
  %78 = call <2 x float> @b2Body_GetPosition(i64 %77)
  store <2 x float> %78, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %79 = load i64, ptr %12, align 4
  %80 = call <2 x float> @b2Body_GetRotation(i64 %79)
  store <2 x float> %80, ptr %22, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %81

81:                                               ; preds = %73
  %82 = load i32, ptr %20, align 4, !tbaa !25
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %20, align 4, !tbaa !25
  br label %69, !llvm.loop !26

84:                                               ; preds = %72
  %85 = load i32, ptr %3, align 2
  call void @b2DestroyWorld(i32 %85)
  br label %86

86:                                               ; preds = %84
  %87 = getelementptr inbounds %struct.b2Vec2, ptr %18, i32 0, i32 0
  %88 = load float, ptr %87, align 4, !tbaa !5
  %89 = call float @b2AbsFloat(float noundef %88)
  %90 = fcmp olt float %89, 0x3F847AE140000000
  %91 = zext i1 %90 to i32
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %95

93:                                               ; preds = %86
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 94, ptr noundef @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

95:                                               ; preds = %86
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  %99 = getelementptr inbounds %struct.b2Vec2, ptr %18, i32 0, i32 1
  %100 = load float, ptr %99, align 4, !tbaa !10
  %101 = fsub float %100, 1.000000e+00
  %102 = call float @b2AbsFloat(float noundef %101)
  %103 = fcmp olt float %102, 0x3F847AE140000000
  %104 = zext i1 %103 to i32
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %98
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 95, ptr noundef @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

108:                                              ; preds = %98
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  %112 = load <2 x float>, ptr %19, align 4
  %113 = call float @b2Rot_GetAngle(<2 x float> %112)
  %114 = call float @b2AbsFloat(float noundef %113)
  %115 = fcmp olt float %114, 0x3F847AE140000000
  %116 = zext i1 %115 to i32
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %120

118:                                              ; preds = %111
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

120:                                              ; preds = %111
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, 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 80, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %1) #7
  ret i32 0
}

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

declare void @b2DefaultWorldDef(ptr dead_on_unwind writable sret(%struct.b2WorldDef) 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 i32 @b2CreateWorld(ptr noundef) #2

declare zeroext i1 @b2World_IsValid(i32) #2

declare i32 @printf(ptr noundef, ...) #2

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

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

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

declare zeroext i1 @b2Body_IsValid(i64) #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

declare <2 x float> @b2Body_GetPosition(i64) #2

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

declare void @b2World_Step(i32, float noundef, i32 noundef) #2

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

declare void @b2DestroyWorld(i32) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2AbsFloat(float noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Rot_GetAngle(<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 = { 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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !15, i64 0}
!14 = !{!"b2BodyDef", !15, i64 0, !6, i64 4, !16, i64 12, !6, i64 20, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !17, i64 48, !17, i64 56, !18, i64 64, !18, i64 65, !18, i64 66, !18, i64 67, !18, i64 68, !18, i64 69, !15, i64 72}
!15 = !{!"int", !8, i64 0}
!16 = !{!"b2Rot", !7, i64 0, !7, i64 4}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!20, !7, i64 32}
!20 = !{!"b2ShapeDef", !17, i64 0, !21, i64 8, !7, i64 32, !22, i64 40, !18, i64 64, !18, i64 65, !18, i64 66, !18, i64 67, !18, i64 68, !18, i64 69, !18, i64 70, !15, i64 72}
!21 = !{!"b2SurfaceMaterial", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !15, i64 16, !15, i64 20}
!22 = !{!"b2Filter", !23, i64 0, !23, i64 8, !15, i64 16}
!23 = !{!"long", !8, i64 0}
!24 = !{!20, !7, i64 8}
!25 = !{!15, !15, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.HelloWorld = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [67 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @HelloWorld() local_unnamed_addr #0 {
  %1 = alloca %struct.b2WorldDef, align 8
  %2 = alloca %struct.b2BodyDef, align 8
  %3 = alloca %struct.b2Polygon, align 4
  %4 = alloca %struct.b2ShapeDef, align 8
  %5 = alloca %struct.b2BodyDef, align 8
  %6 = alloca %struct.b2Polygon, align 4
  %7 = alloca %struct.b2ShapeDef, align 8
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %1) #7
  call void @b2DefaultWorldDef(ptr dead_on_unwind nonnull writable sret(%struct.b2WorldDef) align 8 %1) #7
  store <2 x float> <float 0.000000e+00, float -1.000000e+01>, ptr %1, align 8, !tbaa !5
  %8 = call i32 @b2CreateWorld(ptr noundef nonnull %1) #7
  %9 = call zeroext i1 @b2World_IsValid(i32 %8) #7
  br i1 %9, label %12, label %10

10:                                               ; preds = %0
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 26, ptr noundef nonnull @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %2) #7
  %13 = getelementptr inbounds i8, ptr %2, i64 4
  store <2 x float> <float 0.000000e+00, float -1.000000e+01>, ptr %13, align 4, !tbaa !5
  %14 = call i64 @b2CreateBody(i32 %8, ptr noundef nonnull %2) #7
  %15 = call zeroext i1 @b2Body_IsValid(i64 %14) #7
  br i1 %15, label %18, label %16

16:                                               ; preds = %12
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 36, ptr noundef nonnull @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #7
  call void @b2MakeBox(ptr dead_on_unwind nonnull writable sret(%struct.b2Polygon) align 4 %3, float noundef 5.000000e+01, float noundef 1.000000e+01) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #7
  call void @b2DefaultShapeDef(ptr dead_on_unwind nonnull writable sret(%struct.b2ShapeDef) align 8 %4) #7
  %19 = call i64 @b2CreatePolygonShape(i64 %14, ptr noundef nonnull %4, ptr noundef nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  call void @b2DefaultBodyDef(ptr dead_on_unwind nonnull writable sret(%struct.b2BodyDef) align 8 %5) #7
  store i32 2, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %5, i64 4
  store <2 x float> <float 0.000000e+00, float 4.000000e+00>, ptr %20, align 4, !tbaa !5
  %21 = call i64 @b2CreateBody(i32 %8, ptr noundef nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %6) #7
  call void @b2MakeBox(ptr dead_on_unwind nonnull writable sret(%struct.b2Polygon) align 4 %6, float noundef 1.000000e+00, float noundef 1.000000e+00) #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
  %22 = getelementptr inbounds i8, ptr %7, i64 32
  store float 1.000000e+00, ptr %22, align 8, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %7, i64 8
  store float 0x3FD3333340000000, ptr %23, align 8, !tbaa !21
  %24 = call i64 @b2CreatePolygonShape(i64 %21, ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %25 = call <2 x float> @b2Body_GetPosition(i64 %21) #7
  %26 = call <2 x float> @b2Body_GetRotation(i64 %21) #7
  br label %30

27:                                               ; preds = %30
  call void @b2DestroyWorld(i32 %8) #7
  %.sroa.04.0.vec.extract = extractelement <2 x float> %31, i64 0
  %28 = call float @b2AbsFloat(float noundef %.sroa.04.0.vec.extract)
  %29 = fcmp uge float %28, 0x3F847AE140000000
  br i1 %29, label %34, label %36

30:                                               ; preds = %18, %30
  %.025 = phi i32 [ 0, %18 ], [ %33, %30 ]
  call void @b2World_Step(i32 %8, float noundef 0x3F91111120000000, i32 noundef 4) #7
  %31 = call <2 x float> @b2Body_GetPosition(i64 %21) #7
  %32 = call <2 x float> @b2Body_GetRotation(i64 %21) #7
  %33 = add nuw nsw i32 %.025, 1
  %exitcond.not = icmp eq i32 %33, 90
  br i1 %exitcond.not, label %27, label %30, !llvm.loop !22

34:                                               ; preds = %27
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 94, ptr noundef nonnull @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

36:                                               ; preds = %27
  %.sroa.04.4.vec.extract = extractelement <2 x float> %31, i64 1
  %37 = fadd float %.sroa.04.4.vec.extract, -1.000000e+00
  %38 = call float @b2AbsFloat(float noundef %37)
  %39 = fcmp uge float %38, 0x3F847AE140000000
  br i1 %39, label %40, label %42

40:                                               ; preds = %36
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 95, ptr noundef nonnull @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

42:                                               ; preds = %36
  %43 = call float @b2Rot_GetAngle(<2 x float> %32)
  %44 = call float @b2AbsFloat(float noundef %43)
  %45 = fcmp uge float %44, 0x3F847AE140000000
  br i1 %45, label %46, label %48

46:                                               ; preds = %42
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__.HelloWorld) #8
  unreachable

48:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %1) #7
  ret i32 0
}

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

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

declare i32 @b2CreateWorld(ptr noundef) local_unnamed_addr #2

declare zeroext i1 @b2World_IsValid(i32) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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 zeroext i1 @b2Body_IsValid(i64) 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

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

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

declare void @b2World_Step(i32, float noundef, i32 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

declare void @b2DestroyWorld(i32) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Rot_GetAngle(<2 x float>) local_unnamed_addr #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 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"b2BodyDef", !11, i64 0, !12, i64 4, !13, i64 12, !12, i64 20, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !14, i64 48, !14, i64 56, !15, i64 64, !15, i64 65, !15, i64 66, !15, i64 67, !15, i64 68, !15, i64 69, !11, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!13 = !{!"b2Rot", !6, i64 0, !6, i64 4}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !6, i64 32}
!17 = !{!"b2ShapeDef", !14, i64 0, !18, i64 8, !6, i64 32, !19, i64 40, !15, i64 64, !15, i64 65, !15, i64 66, !15, i64 67, !15, i64 68, !15, i64 69, !15, i64 70, !11, i64 72}
!18 = !{!"b2SurfaceMaterial", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 20}
!19 = !{!"b2Filter", !20, i64 0, !20, i64 8, !11, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!17, !6, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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