; LLVM IR from mtsamis/box2d-optimized :: src/dynamics/b2_world.ll (ZN7b2World4DumpEv)

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

%class.b2World = type { %class.b2BlockAllocator, %class.b2StackAllocator, %class.b2ContactManager, ptr, ptr, ptr, ptr, i32, i32, %struct.b2Vec2, i8, ptr, ptr, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.b2Profile }
%class.b2BlockAllocator = type { ptr, i32, i32, [14 x ptr] }
%class.b2StackAllocator = type <{ [102400 x i8], i32, i32, i32, [4 x i8], [32 x %struct.b2StackEntry], i32, [4 x i8] }>
%struct.b2StackEntry = type { ptr, i32, i8 }
%class.b2ContactManager = type { %class.b2BroadPhase, i32, ptr, ptr, ptr, ptr }
%class.b2BroadPhase = type <{ ptr, ptr, ptr, ptr, %struct.b2TreeNode, ptr, ptr, ptr, i32, i32, %class.b2IntHashTable, i32, i32, i8, [7 x i8] }>
%struct.b2TreeNode = type { ptr, ptr, ptr, ptr, %struct.b2AABB }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.b2IntHashTable = type <{ ptr, i32, [4 x i8] }>
%struct.b2Vec2 = type { float, float }
%struct.b2Profile = type { float, float, float, float, float }
%class.b2Body = type { i32, i16, i32, %struct.b2Transform, %struct.b2Transform, %struct.b2Sweep, %struct.b2Vec2, float, %struct.b2Vec2, float, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, float, float, float, float, float, float, float, float, %struct.b2BodyUserData }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2BodyUserData = type { i64 }
%class.b2Joint = type { ptr, i32, ptr, ptr, %struct.b2JointEdge, %struct.b2JointEdge, ptr, ptr, i32, i8, i8, %struct.b2JointUserData }
%struct.b2JointEdge = type { ptr, ptr, ptr, ptr }
%struct.b2JointUserData = type { i64 }

@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World4DumpEv(ptr noundef nonnull align 8 dereferenceable(103352) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  %9 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 16
  %10 = load i8, ptr %9, align 2, !tbaa !9, !range !23, !noundef !24
  %11 = trunc i8 %10 to i1
  br i1 %11, label %12, label %13

12:                                               ; preds = %1
  br label %105

13:                                               ; preds = %1
  call void @_Z10b2OpenDumpPKc(ptr noundef @.str.11)
  %14 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 9
  %15 = getelementptr inbounds %struct.b2Vec2, ptr %14, i32 0, i32 0
  %16 = load float, ptr %15, align 8, !tbaa !25
  %17 = fpext float %16 to double
  %18 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 9
  %19 = getelementptr inbounds %struct.b2Vec2, ptr %18, i32 0, i32 1
  %20 = load float, ptr %19, align 4, !tbaa !26
  %21 = fpext float %20 to double
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.12, double noundef %17, double noundef %21)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.13)
  %22 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 7
  %23 = load i32, ptr %22, align 8, !tbaa !27
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.14, i32 noundef %23)
  %24 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 8
  %25 = load i32, ptr %24, align 4, !tbaa !28
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.15, i32 noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %26 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !30
  store ptr %27, ptr %4, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %39, %13
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %43

32:                                               ; preds = %28
  %33 = load i32, ptr %3, align 4, !tbaa !29
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.b2Body, ptr %34, i32 0, i32 2
  store i32 %33, ptr %35, align 8, !tbaa !31
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6b2Body4DumpEv(ptr noundef nonnull align 8 dereferenceable(208) %36)
  %37 = load i32, ptr %3, align 4, !tbaa !29
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %3, align 4, !tbaa !29
  br label %39

39:                                               ; preds = %32
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.b2Body, ptr %40, i32 0, i32 12
  %42 = load ptr, ptr %41, align 8, !tbaa !40
  store ptr %42, ptr %4, align 8, !tbaa !5
  br label %28, !llvm.loop !41

43:                                               ; preds = %31
  store i32 0, ptr %3, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %44 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 5
  %45 = load ptr, ptr %44, align 8, !tbaa !43
  store ptr %45, ptr %5, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %56, %43
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %60

50:                                               ; preds = %46
  %51 = load i32, ptr %3, align 4, !tbaa !29
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.b2Joint, ptr %52, i32 0, i32 8
  store i32 %51, ptr %53, align 8, !tbaa !44
  %54 = load i32, ptr %3, align 4, !tbaa !29
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %3, align 4, !tbaa !29
  br label %56

56:                                               ; preds = %50
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.b2Joint, ptr %57, i32 0, i32 3
  %59 = load ptr, ptr %58, align 8, !tbaa !49
  store ptr %59, ptr %5, align 8, !tbaa !5
  br label %46, !llvm.loop !50

60:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %61 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 5
  %62 = load ptr, ptr %61, align 8, !tbaa !43
  store ptr %62, ptr %6, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %78, %60
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %82

67:                                               ; preds = %63
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.b2Joint, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !51
  %71 = icmp eq i32 %70, 6
  br i1 %71, label %72, label %73

72:                                               ; preds = %67
  br label %78

73:                                               ; preds = %67
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.16)
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !52
  %76 = getelementptr inbounds ptr, ptr %75, i64 4
  %77 = load ptr, ptr %76, align 8
  call void %77(ptr noundef nonnull align 8 dereferenceable(128) %74)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.17)
  br label %78

78:                                               ; preds = %73, %72
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.b2Joint, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !49
  store ptr %81, ptr %6, align 8, !tbaa !5
  br label %63, !llvm.loop !54

82:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %83 = getelementptr inbounds %class.b2World, ptr %8, i32 0, i32 5
  %84 = load ptr, ptr %83, align 8, !tbaa !43
  store ptr %84, ptr %7, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %100, %82
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %104

89:                                               ; preds = %85
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %class.b2Joint, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 8, !tbaa !51
  %93 = icmp ne i32 %92, 6
  br i1 %93, label %94, label %95

94:                                               ; preds = %89
  br label %100

95:                                               ; preds = %89
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.16)
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %96, align 8, !tbaa !52
  %98 = getelementptr inbounds ptr, ptr %97, i64 4
  %99 = load ptr, ptr %98, align 8
  call void %99(ptr noundef nonnull align 8 dereferenceable(128) %96)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.17)
  br label %100

100:                                              ; preds = %95, %94
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %class.b2Joint, ptr %101, i32 0, i32 3
  %103 = load ptr, ptr %102, align 8, !tbaa !49
  store ptr %103, ptr %7, align 8, !tbaa !5
  br label %85, !llvm.loop !55

104:                                              ; preds = %88
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.18)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.19)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.20)
  call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef @.str.21)
  call void @_Z11b2CloseDumpv()
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %105

105:                                              ; preds = %104, %12
  ret void
}

declare void @_Z10b2OpenDumpPKc(ptr noundef) #2

declare void @_Z6b2DumpPKcz(ptr noundef, ...) #2

declare void @_ZN6b2Body4DumpEv(ptr noundef nonnull align 8 dereferenceable(208)) #2

declare void @_Z11b2CloseDumpv() #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #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 = { 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, !21, i64 103326}
!10 = !{!"_ZTS7b2World", !11, i64 0, !13, i64 128, !14, i64 103064, !6, i64 103248, !6, i64 103256, !6, i64 103264, !6, i64 103272, !12, i64 103280, !12, i64 103284, !18, i64 103288, !21, i64 103296, !6, i64 103304, !6, i64 103312, !19, i64 103320, !21, i64 103324, !21, i64 103325, !21, i64 103326, !21, i64 103327, !21, i64 103328, !21, i64 103329, !21, i64 103330, !21, i64 103331, !22, i64 103332}
!11 = !{!"_ZTS16b2BlockAllocator", !6, i64 0, !12, i64 8, !12, i64 12, !7, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16b2StackAllocator", !7, i64 0, !12, i64 102400, !12, i64 102404, !12, i64 102408, !7, i64 102416, !12, i64 102928}
!14 = !{!"_ZTS16b2ContactManager", !15, i64 0, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!15 = !{!"_ZTS12b2BroadPhase", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !6, i64 80, !6, i64 88, !6, i64 96, !12, i64 104, !12, i64 108, !20, i64 112, !12, i64 128, !12, i64 132, !21, i64 136}
!16 = !{!"_ZTS10b2TreeNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32}
!17 = !{!"_ZTS6b2AABB", !18, i64 0, !18, i64 8}
!18 = !{!"_ZTS6b2Vec2", !19, i64 0, !19, i64 4}
!19 = !{!"float", !7, i64 0}
!20 = !{!"_ZTS14b2IntHashTable", !6, i64 0, !12, i64 8}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTS9b2Profile", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12, !19, i64 16}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!10, !19, i64 103288}
!26 = !{!10, !19, i64 103292}
!27 = !{!10, !12, i64 103280}
!28 = !{!10, !12, i64 103284}
!29 = !{!12, !12, i64 0}
!30 = !{!10, !6, i64 103248}
!31 = !{!32, !12, i64 8}
!32 = !{!"_ZTS6b2Body", !33, i64 0, !34, i64 4, !12, i64 8, !35, i64 12, !35, i64 28, !37, i64 44, !18, i64 80, !19, i64 88, !18, i64 92, !19, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !6, i64 144, !6, i64 152, !12, i64 160, !12, i64 164, !19, i64 168, !19, i64 172, !19, i64 176, !19, i64 180, !19, i64 184, !19, i64 188, !19, i64 192, !19, i64 196, !38, i64 200}
!33 = !{!"_ZTS10b2BodyType", !7, i64 0}
!34 = !{!"short", !7, i64 0}
!35 = !{!"_ZTS11b2Transform", !18, i64 0, !36, i64 8}
!36 = !{!"_ZTS5b2Rot", !19, i64 0, !19, i64 4}
!37 = !{!"_ZTS7b2Sweep", !18, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 28, !19, i64 32}
!38 = !{!"_ZTS14b2BodyUserData", !39, i64 0}
!39 = !{!"long", !7, i64 0}
!40 = !{!32, !6, i64 120}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!10, !6, i64 103264}
!44 = !{!45, !12, i64 112}
!45 = !{!"_ZTS7b2Joint", !46, i64 8, !6, i64 16, !6, i64 24, !47, i64 32, !47, i64 64, !6, i64 96, !6, i64 104, !12, i64 112, !21, i64 116, !21, i64 117, !48, i64 120}
!46 = !{!"_ZTS11b2JointType", !7, i64 0}
!47 = !{!"_ZTS11b2JointEdge", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!48 = !{!"_ZTS15b2JointUserData", !39, i64 0}
!49 = !{!45, !6, i64 24}
!50 = distinct !{!50, !42}
!51 = !{!45, !46, i64 8}
!52 = !{!53, !53, i64 0}
!53 = !{!"vtable pointer", !8, i64 0}
!54 = distinct !{!54, !42}
!55 = distinct !{!55, !42}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World4DumpEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(103352) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 103326
  %3 = load i8, ptr %2, align 2, !tbaa !5, !range !22, !noundef !23
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %41, label %5

5:                                                ; preds = %1
  tail call void @_Z10b2OpenDumpPKc(ptr noundef nonnull @.str.11)
  %6 = getelementptr inbounds i8, ptr %0, i64 103288
  %7 = load float, ptr %6, align 8, !tbaa !24
  %8 = fpext float %7 to double
  %9 = getelementptr inbounds i8, ptr %0, i64 103292
  %10 = load float, ptr %9, align 4, !tbaa !25
  %11 = fpext float %10 to double
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.12, double noundef %8, double noundef %11)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.13)
  %12 = getelementptr inbounds i8, ptr %0, i64 103280
  %13 = load i32, ptr %12, align 8, !tbaa !26
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.14, i32 noundef %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 103284
  %15 = load i32, ptr %14, align 4, !tbaa !27
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.15, i32 noundef %15)
  %16 = getelementptr inbounds i8, ptr %0, i64 103248
  %.02128 = load ptr, ptr %16, align 8, !tbaa !28
  %.not29 = icmp eq ptr %.02128, null
  br i1 %.not29, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %5
  %17 = getelementptr inbounds i8, ptr %0, i64 103264
  %.02032 = load ptr, ptr %17, align 8, !tbaa !28
  %.not2333 = icmp eq ptr %.02032, null
  br i1 %.not2333, label %._crit_edge46, label %.lr.ph37

.lr.ph:                                           ; preds = %5, %.lr.ph
  %.02131 = phi ptr [ %.021, %.lr.ph ], [ %.02128, %5 ]
  %.02230 = phi i32 [ %19, %.lr.ph ], [ 0, %5 ]
  %18 = getelementptr inbounds i8, ptr %.02131, i64 8
  store i32 %.02230, ptr %18, align 8, !tbaa !29
  tail call void @_ZN6b2Body4DumpEv(ptr noundef nonnull align 8 dereferenceable(208) %.02131)
  %19 = add nuw nsw i32 %.02230, 1
  %20 = getelementptr inbounds i8, ptr %.02131, i64 120
  %.021 = load ptr, ptr %20, align 8, !tbaa !28
  %.not = icmp eq ptr %.021, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !38

.preheader27:                                     ; preds = %.lr.ph37
  br i1 %.not2333, label %._crit_edge46, label %.lr.ph41

.lr.ph37:                                         ; preds = %._crit_edge, %.lr.ph37
  %.02035 = phi ptr [ %.020, %.lr.ph37 ], [ %.02032, %._crit_edge ]
  %.134 = phi i32 [ %22, %.lr.ph37 ], [ 0, %._crit_edge ]
  %21 = getelementptr inbounds i8, ptr %.02035, i64 112
  store i32 %.134, ptr %21, align 8, !tbaa !40
  %22 = add nuw nsw i32 %.134, 1
  %23 = getelementptr inbounds i8, ptr %.02035, i64 24
  %.020 = load ptr, ptr %23, align 8, !tbaa !28
  %.not23 = icmp eq ptr %.020, null
  br i1 %.not23, label %.preheader27, label %.lr.ph37, !llvm.loop !45

.preheader:                                       ; preds = %31
  %.042.pre = load ptr, ptr %17, align 8, !tbaa !28
  %.not2543 = icmp eq ptr %.042.pre, null
  br i1 %.not2543, label %._crit_edge46, label %.lr.ph45

.lr.ph41:                                         ; preds = %.preheader27, %31
  %.01940 = phi ptr [ %.019, %31 ], [ %.02032, %.preheader27 ]
  %24 = getelementptr inbounds i8, ptr %.01940, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !46
  %26 = icmp eq i32 %25, 6
  br i1 %26, label %31, label %27

27:                                               ; preds = %.lr.ph41
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.16)
  %28 = load ptr, ptr %.01940, align 8, !tbaa !47
  %29 = getelementptr inbounds i8, ptr %28, i64 32
  %30 = load ptr, ptr %29, align 8
  tail call void %30(ptr noundef nonnull align 8 dereferenceable(128) %.01940)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.17)
  br label %31

31:                                               ; preds = %.lr.ph41, %27
  %32 = getelementptr inbounds i8, ptr %.01940, i64 24
  %.019 = load ptr, ptr %32, align 8, !tbaa !28
  %.not24 = icmp eq ptr %.019, null
  br i1 %.not24, label %.preheader, label %.lr.ph41, !llvm.loop !49

._crit_edge46:                                    ; preds = %39, %._crit_edge, %.preheader27, %.preheader
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.18)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.19)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.20)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.21)
  tail call void @_Z11b2CloseDumpv()
  br label %41

.lr.ph45:                                         ; preds = %.preheader, %39
  %.044 = phi ptr [ %.0, %39 ], [ %.042.pre, %.preheader ]
  %33 = getelementptr inbounds i8, ptr %.044, i64 8
  %34 = load i32, ptr %33, align 8, !tbaa !46
  %.not26 = icmp eq i32 %34, 6
  br i1 %.not26, label %35, label %39

35:                                               ; preds = %.lr.ph45
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.16)
  %36 = load ptr, ptr %.044, align 8, !tbaa !47
  %37 = getelementptr inbounds i8, ptr %36, i64 32
  %38 = load ptr, ptr %37, align 8
  tail call void %38(ptr noundef nonnull align 8 dereferenceable(128) %.044)
  tail call void (ptr, ...) @_Z6b2DumpPKcz(ptr noundef nonnull @.str.17)
  br label %39

39:                                               ; preds = %.lr.ph45, %35
  %40 = getelementptr inbounds i8, ptr %.044, i64 24
  %.0 = load ptr, ptr %40, align 8, !tbaa !28
  %.not25 = icmp eq ptr %.0, null
  br i1 %.not25, label %._crit_edge46, label %.lr.ph45, !llvm.loop !50

41:                                               ; preds = %1, %._crit_edge46
  ret void
}

declare void @_Z10b2OpenDumpPKc(ptr noundef) local_unnamed_addr #1

declare void @_Z6b2DumpPKcz(ptr noundef, ...) local_unnamed_addr #1

declare void @_ZN6b2Body4DumpEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #1

declare void @_Z11b2CloseDumpv() local_unnamed_addr #1

attributes #0 = { mustprogress 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 #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" }

!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, !20, i64 103326}
!6 = !{!"_ZTS7b2World", !7, i64 0, !12, i64 128, !13, i64 103064, !8, i64 103248, !8, i64 103256, !8, i64 103264, !8, i64 103272, !11, i64 103280, !11, i64 103284, !17, i64 103288, !20, i64 103296, !8, i64 103304, !8, i64 103312, !18, i64 103320, !20, i64 103324, !20, i64 103325, !20, i64 103326, !20, i64 103327, !20, i64 103328, !20, i64 103329, !20, i64 103330, !20, i64 103331, !21, i64 103332}
!7 = !{!"_ZTS16b2BlockAllocator", !8, i64 0, !11, i64 8, !11, i64 12, !9, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTS16b2StackAllocator", !9, i64 0, !11, i64 102400, !11, i64 102404, !11, i64 102408, !9, i64 102416, !11, i64 102928}
!13 = !{!"_ZTS16b2ContactManager", !14, i64 0, !11, i64 144, !8, i64 152, !8, i64 160, !8, i64 168, !8, i64 176}
!14 = !{!"_ZTS12b2BroadPhase", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !15, i64 32, !8, i64 80, !8, i64 88, !8, i64 96, !11, i64 104, !11, i64 108, !19, i64 112, !11, i64 128, !11, i64 132, !20, i64 136}
!15 = !{!"_ZTS10b2TreeNode", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !16, i64 32}
!16 = !{!"_ZTS6b2AABB", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS6b2Vec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !9, i64 0}
!19 = !{!"_ZTS14b2IntHashTable", !8, i64 0, !11, i64 8}
!20 = !{!"bool", !9, i64 0}
!21 = !{!"_ZTS9b2Profile", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!6, !18, i64 103288}
!25 = !{!6, !18, i64 103292}
!26 = !{!6, !11, i64 103280}
!27 = !{!6, !11, i64 103284}
!28 = !{!8, !8, i64 0}
!29 = !{!30, !11, i64 8}
!30 = !{!"_ZTS6b2Body", !31, i64 0, !32, i64 4, !11, i64 8, !33, i64 12, !33, i64 28, !35, i64 44, !17, i64 80, !18, i64 88, !17, i64 92, !18, i64 100, !8, i64 104, !8, i64 112, !8, i64 120, !8, i64 128, !11, i64 136, !8, i64 144, !8, i64 152, !11, i64 160, !11, i64 164, !18, i64 168, !18, i64 172, !18, i64 176, !18, i64 180, !18, i64 184, !18, i64 188, !18, i64 192, !18, i64 196, !36, i64 200}
!31 = !{!"_ZTS10b2BodyType", !9, i64 0}
!32 = !{!"short", !9, i64 0}
!33 = !{!"_ZTS11b2Transform", !17, i64 0, !34, i64 8}
!34 = !{!"_ZTS5b2Rot", !18, i64 0, !18, i64 4}
!35 = !{!"_ZTS7b2Sweep", !17, i64 0, !17, i64 8, !17, i64 16, !18, i64 24, !18, i64 28, !18, i64 32}
!36 = !{!"_ZTS14b2BodyUserData", !37, i64 0}
!37 = !{!"long", !9, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!41, !11, i64 112}
!41 = !{!"_ZTS7b2Joint", !42, i64 8, !8, i64 16, !8, i64 24, !43, i64 32, !43, i64 64, !8, i64 96, !8, i64 104, !11, i64 112, !20, i64 116, !20, i64 117, !44, i64 120}
!42 = !{!"_ZTS11b2JointType", !9, i64 0}
!43 = !{!"_ZTS11b2JointEdge", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!44 = !{!"_ZTS15b2JointUserData", !37, i64 0}
!45 = distinct !{!45, !39}
!46 = !{!41, !42, i64 8}
!47 = !{!48, !48, i64 0}
!48 = !{!"vtable pointer", !10, i64 0}
!49 = distinct !{!49, !39}
!50 = distinct !{!50, !39}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass