; LLVM IR from erincatto/box2d :: src (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.b2Counters = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [12 x i32] }
%struct.b2WorldId = type { i16, i16 }
%struct.b2World = type { %struct.b2ArenaAllocator, %struct.b2BroadPhase, %struct.b2ConstraintGraph, %struct.b2IdPool, %struct.b2BodyArray, %struct.b2IdPool, %struct.b2SolverSetArray, %struct.b2IdPool, %struct.b2JointArray, %struct.b2IdPool, %struct.b2ContactArray, %struct.b2IdPool, %struct.b2IslandArray, %struct.b2IdPool, %struct.b2IdPool, %struct.b2ShapeArray, %struct.b2ChainShapeArray, %struct.b2SensorArray, %struct.b2TaskContextArray, %struct.b2SensorTaskContextArray, %struct.b2BodyMoveEventArray, %struct.b2SensorBeginTouchEventArray, %struct.b2ContactBeginTouchEventArray, [2 x %struct.b2SensorEndTouchEventArray], [2 x %struct.b2ContactEndTouchEventArray], i32, %struct.b2ContactHitEventArray, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, i64, i32, %struct.b2Vec2, float, float, float, float, float, float, float, float, ptr, ptr, i16, %struct.b2Profile, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, float, i32, i32, i16, i8, i8, i8, i8, i8, i8 }
%struct.b2ArenaAllocator = type { ptr, i32, i32, i32, i32, %struct.b2ArenaEntryArray }
%struct.b2ArenaEntryArray = type { ptr, i32, i32 }
%struct.b2BroadPhase = type { [3 x %struct.b2DynamicTree], i32, %struct.b2HashSet, %struct.b2IntArray, ptr, ptr, i32, %struct.b2AtomicInt, %struct.b2HashSet }
%struct.b2DynamicTree = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32 }
%struct.b2IntArray = type { ptr, i32, i32 }
%struct.b2AtomicInt = type { i32 }
%struct.b2HashSet = type { ptr, i32, i32 }
%struct.b2ConstraintGraph = type { [12 x %struct.b2GraphColor] }
%struct.b2GraphColor = type { %struct.b2BitSet, %struct.b2ContactSimArray, %struct.b2JointSimArray, %union.anon }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon = type { ptr }
%struct.b2BodyArray = type { ptr, i32, i32 }
%struct.b2SolverSetArray = type { ptr, i32, i32 }
%struct.b2JointArray = type { ptr, i32, i32 }
%struct.b2ContactArray = type { ptr, i32, i32 }
%struct.b2IslandArray = type { ptr, i32, i32 }
%struct.b2IdPool = type { %struct.b2IntArray, i32 }
%struct.b2ShapeArray = type { ptr, i32, i32 }
%struct.b2ChainShapeArray = type { ptr, i32, i32 }
%struct.b2SensorArray = type { ptr, i32, i32 }
%struct.b2TaskContextArray = type { ptr, i32, i32 }
%struct.b2SensorTaskContextArray = type { ptr, i32, i32 }
%struct.b2BodyMoveEventArray = type { ptr, i32, i32 }
%struct.b2SensorBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2SensorEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactHitEventArray = type { ptr, i32, i32 }
%struct.b2BitSet = type { ptr, i32, i32 }
%struct.b2Vec2 = type { float, float }
%struct.b2Profile = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetWorldFromId(i32) #1

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2MaxInt(i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @b2World_GetCounters(ptr dead_on_unwind noalias writable sret(%struct.b2Counters) align 4 %0, i32 %1) #1 {
  %3 = alloca %struct.b2WorldId, align 2
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store i32 %1, ptr %3, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %9 = load i32, ptr %3, align 2
  %10 = call ptr @b2GetWorldFromId(i32 %9)
  store ptr %10, ptr %4, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %0, i8 0, i64 88, i1 false)
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.b2World, ptr %11, i32 0, i32 3
  %13 = call i32 @b2GetIdCount(ptr noundef %12)
  %14 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 0
  store i32 %13, ptr %14, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.b2World, ptr %15, i32 0, i32 13
  %17 = call i32 @b2GetIdCount(ptr noundef %16)
  %18 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 1
  store i32 %17, ptr %18, align 4, !tbaa !12
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.b2World, ptr %19, i32 0, i32 9
  %21 = call i32 @b2GetIdCount(ptr noundef %20)
  %22 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 2
  store i32 %21, ptr %22, align 4, !tbaa !13
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.b2World, ptr %23, i32 0, i32 7
  %25 = call i32 @b2GetIdCount(ptr noundef %24)
  %26 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 3
  store i32 %25, ptr %26, align 4, !tbaa !14
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.b2World, ptr %27, i32 0, i32 11
  %29 = call i32 @b2GetIdCount(ptr noundef %28)
  %30 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 4
  store i32 %29, ptr %30, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.b2World, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.b2BroadPhase, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds [3 x %struct.b2DynamicTree], ptr %33, i64 0, i64 0
  %35 = getelementptr inbounds %struct.b2DynamicTree, ptr %34, i64 0
  store ptr %35, ptr %5, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call i32 @b2DynamicTree_GetHeight(ptr noundef %36)
  %38 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 6
  store i32 %37, ptr %38, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b2World, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %struct.b2BroadPhase, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds [3 x %struct.b2DynamicTree], ptr %41, i64 0, i64 0
  %43 = getelementptr inbounds %struct.b2DynamicTree, ptr %42, i64 2
  store ptr %43, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.b2World, ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds %struct.b2BroadPhase, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds [3 x %struct.b2DynamicTree], ptr %46, i64 0, i64 0
  %48 = getelementptr inbounds %struct.b2DynamicTree, ptr %47, i64 1
  store ptr %48, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = call i32 @b2DynamicTree_GetHeight(ptr noundef %49)
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call i32 @b2DynamicTree_GetHeight(ptr noundef %51)
  %53 = call i32 @b2MaxInt(i32 noundef %50, i32 noundef %52)
  %54 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 7
  store i32 %53, ptr %54, align 4, !tbaa !17
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.b2World, ptr %55, i32 0, i32 0
  %57 = call i32 @b2GetMaxArenaAllocation(ptr noundef %56)
  %58 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 5
  store i32 %57, ptr %58, align 4, !tbaa !18
  %59 = call i32 @b2GetByteCount()
  %60 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 8
  store i32 %59, ptr %60, align 4, !tbaa !19
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.b2World, ptr %61, i32 0, i32 58
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 9
  store i32 %63, ptr %64, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !37
  br label %65

65:                                               ; preds = %93, %2
  %66 = load i32, ptr %8, align 4, !tbaa !37
  %67 = icmp slt i32 %66, 12
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %96

69:                                               ; preds = %65
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.b2World, ptr %70, i32 0, i32 2
  %72 = getelementptr inbounds %struct.b2ConstraintGraph, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %8, align 4, !tbaa !37
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [12 x %struct.b2GraphColor], ptr %72, i64 0, i64 %74
  %76 = getelementptr inbounds %struct.b2GraphColor, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %struct.b2ContactSimArray, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !38
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.b2World, ptr %79, i32 0, i32 2
  %81 = getelementptr inbounds %struct.b2ConstraintGraph, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %8, align 4, !tbaa !37
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [12 x %struct.b2GraphColor], ptr %81, i64 0, i64 %83
  %85 = getelementptr inbounds %struct.b2GraphColor, ptr %84, i32 0, i32 2
  %86 = getelementptr inbounds %struct.b2JointSimArray, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 8, !tbaa !40
  %88 = add nsw i32 %78, %87
  %89 = getelementptr inbounds %struct.b2Counters, ptr %0, i32 0, i32 10
  %90 = load i32, ptr %8, align 4, !tbaa !37
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [12 x i32], ptr %89, i64 0, i64 %91
  store i32 %88, ptr %92, align 4, !tbaa !37
  br label %93

93:                                               ; preds = %69
  %94 = load i32, ptr %8, align 4, !tbaa !37
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %8, align 4, !tbaa !37
  br label %65, !llvm.loop !41

96:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2GetIdCount(ptr noundef) #3

declare i32 @b2DynamicTree_GetHeight(ptr noundef) #4

declare i32 @b2GetMaxArenaAllocation(ptr noundef) #4

declare i32 @b2GetByteCount() #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"b2Counters", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !11, i64 12}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !11, i64 24}
!17 = !{!10, !11, i64 28}
!18 = !{!10, !11, i64 20}
!19 = !{!10, !11, i64 32}
!20 = !{!21, !11, i64 1792}
!21 = !{!"b2World", !22, i64 0, !24, i64 40, !27, i64 336, !28, i64 1008, !23, i64 1032, !28, i64 1048, !23, i64 1072, !28, i64 1088, !23, i64 1112, !28, i64 1128, !23, i64 1152, !28, i64 1168, !23, i64 1192, !28, i64 1208, !28, i64 1232, !23, i64 1256, !23, i64 1272, !23, i64 1288, !23, i64 1304, !23, i64 1320, !23, i64 1336, !23, i64 1352, !23, i64 1368, !7, i64 1384, !7, i64 1416, !11, i64 1448, !23, i64 1456, !29, i64 1472, !29, i64 1488, !29, i64 1504, !29, i64 1520, !30, i64 1536, !11, i64 1544, !31, i64 1548, !32, i64 1556, !32, i64 1560, !32, i64 1564, !32, i64 1568, !32, i64 1572, !32, i64 1576, !32, i64 1580, !32, i64 1584, !6, i64 1592, !6, i64 1600, !33, i64 1608, !34, i64 1612, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !11, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !32, i64 1784, !11, i64 1788, !11, i64 1792, !33, i64 1796, !35, i64 1798, !35, i64 1799, !35, i64 1800, !35, i64 1801, !35, i64 1802, !35, i64 1803}
!22 = !{!"b2ArenaAllocator", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !23, i64 24}
!23 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12}
!24 = !{!"b2BroadPhase", !7, i64 0, !11, i64 216, !25, i64 224, !23, i64 240, !6, i64 256, !6, i64 264, !11, i64 272, !26, i64 276, !25, i64 280}
!25 = !{!"b2HashSet", !6, i64 0, !11, i64 8, !11, i64 12}
!26 = !{!"b2AtomicInt", !11, i64 0}
!27 = !{!"b2ConstraintGraph", !7, i64 0}
!28 = !{!"b2IdPool", !23, i64 0, !11, i64 16}
!29 = !{!"b2BitSet", !6, i64 0, !11, i64 8, !11, i64 12}
!30 = !{!"long", !7, i64 0}
!31 = !{!"b2Vec2", !32, i64 0, !32, i64 4}
!32 = !{!"float", !7, i64 0}
!33 = !{!"short", !7, i64 0}
!34 = !{!"b2Profile", !32, i64 0, !32, i64 4, !32, i64 8, !32, i64 12, !32, i64 16, !32, i64 20, !32, i64 24, !32, i64 28, !32, i64 32, !32, i64 36, !32, i64 40, !32, i64 44, !32, i64 48, !32, i64 52, !32, i64 56, !32, i64 60, !32, i64 64, !32, i64 68, !32, i64 72, !32, i64 76, !32, i64 80, !32, i64 84}
!35 = !{!"_Bool", !7, i64 0}
!36 = !{!10, !11, i64 36}
!37 = !{!11, !11, i64 0}
!38 = !{!39, !11, i64 24}
!39 = !{!"b2GraphColor", !29, i64 0, !23, i64 16, !23, i64 32, !7, i64 48}
!40 = !{!39, !11, i64 40}
!41 = distinct !{!41, !42}
!42 = !{!"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.b2Counters = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [12 x i32] }

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetWorldFromId(i32) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2MaxInt(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @b2World_GetCounters(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.b2Counters) align 4 %0, i32 %1) local_unnamed_addr #0 {
  %3 = tail call ptr @b2GetWorldFromId(i32 %1)
  %4 = getelementptr inbounds i8, ptr %3, i64 1008
  %5 = tail call i32 @b2GetIdCount(ptr noundef nonnull %4)
  store i32 %5, ptr %0, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 1208
  %7 = tail call i32 @b2GetIdCount(ptr noundef nonnull %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %7, ptr %8, align 4, !tbaa !10
  %9 = getelementptr inbounds i8, ptr %3, i64 1128
  %10 = tail call i32 @b2GetIdCount(ptr noundef nonnull %9)
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %10, ptr %11, align 4, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %3, i64 1088
  %13 = tail call i32 @b2GetIdCount(ptr noundef nonnull %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %13, ptr %14, align 4, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %3, i64 1168
  %16 = tail call i32 @b2GetIdCount(ptr noundef nonnull %15)
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %16, ptr %17, align 4, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %3, i64 40
  %19 = tail call i32 @b2DynamicTree_GetHeight(ptr noundef nonnull %18) #3
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %19, ptr %20, align 4, !tbaa !14
  %21 = getelementptr inbounds i8, ptr %3, i64 184
  %22 = getelementptr inbounds i8, ptr %3, i64 112
  %23 = tail call i32 @b2DynamicTree_GetHeight(ptr noundef nonnull %21) #3
  %24 = tail call i32 @b2DynamicTree_GetHeight(ptr noundef nonnull %22) #3
  %25 = tail call i32 @b2MaxInt(i32 noundef %23, i32 noundef %24)
  %26 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %25, ptr %26, align 4, !tbaa !15
  %27 = tail call i32 @b2GetMaxArenaAllocation(ptr noundef %3) #3
  %28 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %27, ptr %28, align 4, !tbaa !16
  %29 = tail call i32 @b2GetByteCount() #3
  %30 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %29, ptr %30, align 4, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %3, i64 1792
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %32, ptr %33, align 4, !tbaa !35
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = getelementptr inbounds i8, ptr %3, i64 360
  %36 = load i32, ptr %35, align 8, !tbaa !36
  %37 = getelementptr inbounds i8, ptr %3, i64 376
  %38 = load i32, ptr %37, align 8, !tbaa !38
  %39 = add nsw i32 %38, %36
  store i32 %39, ptr %34, align 4, !tbaa !39
  %40 = getelementptr inbounds i8, ptr %3, i64 416
  %41 = load i32, ptr %40, align 8, !tbaa !36
  %42 = getelementptr inbounds i8, ptr %3, i64 432
  %43 = load i32, ptr %42, align 8, !tbaa !38
  %44 = add nsw i32 %43, %41
  %45 = getelementptr inbounds i8, ptr %0, i64 44
  store i32 %44, ptr %45, align 4, !tbaa !39
  %46 = getelementptr inbounds i8, ptr %3, i64 472
  %47 = load i32, ptr %46, align 8, !tbaa !36
  %48 = getelementptr inbounds i8, ptr %3, i64 488
  %49 = load i32, ptr %48, align 8, !tbaa !38
  %50 = add nsw i32 %49, %47
  %51 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %50, ptr %51, align 4, !tbaa !39
  %52 = getelementptr inbounds i8, ptr %3, i64 528
  %53 = load i32, ptr %52, align 8, !tbaa !36
  %54 = getelementptr inbounds i8, ptr %3, i64 544
  %55 = load i32, ptr %54, align 8, !tbaa !38
  %56 = add nsw i32 %55, %53
  %57 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %56, ptr %57, align 4, !tbaa !39
  %58 = getelementptr inbounds i8, ptr %3, i64 584
  %59 = load i32, ptr %58, align 8, !tbaa !36
  %60 = getelementptr inbounds i8, ptr %3, i64 600
  %61 = load i32, ptr %60, align 8, !tbaa !38
  %62 = add nsw i32 %61, %59
  %63 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %62, ptr %63, align 4, !tbaa !39
  %64 = getelementptr inbounds i8, ptr %3, i64 640
  %65 = load i32, ptr %64, align 8, !tbaa !36
  %66 = getelementptr inbounds i8, ptr %3, i64 656
  %67 = load i32, ptr %66, align 8, !tbaa !38
  %68 = add nsw i32 %67, %65
  %69 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %68, ptr %69, align 4, !tbaa !39
  %70 = getelementptr inbounds i8, ptr %3, i64 696
  %71 = load i32, ptr %70, align 8, !tbaa !36
  %72 = getelementptr inbounds i8, ptr %3, i64 712
  %73 = load i32, ptr %72, align 8, !tbaa !38
  %74 = add nsw i32 %73, %71
  %75 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %74, ptr %75, align 4, !tbaa !39
  %76 = getelementptr inbounds i8, ptr %3, i64 752
  %77 = load i32, ptr %76, align 8, !tbaa !36
  %78 = getelementptr inbounds i8, ptr %3, i64 768
  %79 = load i32, ptr %78, align 8, !tbaa !38
  %80 = add nsw i32 %79, %77
  %81 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %80, ptr %81, align 4, !tbaa !39
  %82 = getelementptr inbounds i8, ptr %3, i64 808
  %83 = load i32, ptr %82, align 8, !tbaa !36
  %84 = getelementptr inbounds i8, ptr %3, i64 824
  %85 = load i32, ptr %84, align 8, !tbaa !38
  %86 = add nsw i32 %85, %83
  %87 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 %86, ptr %87, align 4, !tbaa !39
  %88 = getelementptr inbounds i8, ptr %3, i64 864
  %89 = load i32, ptr %88, align 8, !tbaa !36
  %90 = getelementptr inbounds i8, ptr %3, i64 880
  %91 = load i32, ptr %90, align 8, !tbaa !38
  %92 = add nsw i32 %91, %89
  %93 = getelementptr inbounds i8, ptr %0, i64 76
  store i32 %92, ptr %93, align 4, !tbaa !39
  %94 = getelementptr inbounds i8, ptr %3, i64 920
  %95 = load i32, ptr %94, align 8, !tbaa !36
  %96 = getelementptr inbounds i8, ptr %3, i64 936
  %97 = load i32, ptr %96, align 8, !tbaa !38
  %98 = add nsw i32 %97, %95
  %99 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %98, ptr %99, align 4, !tbaa !39
  %100 = getelementptr inbounds i8, ptr %3, i64 976
  %101 = load i32, ptr %100, align 8, !tbaa !36
  %102 = getelementptr inbounds i8, ptr %3, i64 992
  %103 = load i32, ptr %102, align 8, !tbaa !38
  %104 = add nsw i32 %103, %101
  %105 = getelementptr inbounds i8, ptr %0, i64 84
  store i32 %104, ptr %105, align 4, !tbaa !39
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2GetIdCount(ptr noundef) local_unnamed_addr #1

declare i32 @b2DynamicTree_GetHeight(ptr noundef) local_unnamed_addr #2

declare i32 @b2GetMaxArenaAllocation(ptr noundef) local_unnamed_addr #2

declare i32 @b2GetByteCount() local_unnamed_addr #2

attributes #0 = { 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 #1 = { 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 #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, !7, i64 0}
!6 = !{!"b2Counters", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 24}
!15 = !{!6, !7, i64 28}
!16 = !{!6, !7, i64 20}
!17 = !{!6, !7, i64 32}
!18 = !{!19, !7, i64 1792}
!19 = !{!"b2World", !20, i64 0, !23, i64 40, !26, i64 336, !27, i64 1008, !22, i64 1032, !27, i64 1048, !22, i64 1072, !27, i64 1088, !22, i64 1112, !27, i64 1128, !22, i64 1152, !27, i64 1168, !22, i64 1192, !27, i64 1208, !27, i64 1232, !22, i64 1256, !22, i64 1272, !22, i64 1288, !22, i64 1304, !22, i64 1320, !22, i64 1336, !22, i64 1352, !22, i64 1368, !8, i64 1384, !8, i64 1416, !7, i64 1448, !22, i64 1456, !28, i64 1472, !28, i64 1488, !28, i64 1504, !28, i64 1520, !29, i64 1536, !7, i64 1544, !30, i64 1548, !31, i64 1556, !31, i64 1560, !31, i64 1564, !31, i64 1568, !31, i64 1572, !31, i64 1576, !31, i64 1580, !31, i64 1584, !21, i64 1592, !21, i64 1600, !32, i64 1608, !33, i64 1612, !21, i64 1704, !21, i64 1712, !21, i64 1720, !21, i64 1728, !7, i64 1736, !21, i64 1744, !21, i64 1752, !21, i64 1760, !21, i64 1768, !21, i64 1776, !31, i64 1784, !7, i64 1788, !7, i64 1792, !32, i64 1796, !34, i64 1798, !34, i64 1799, !34, i64 1800, !34, i64 1801, !34, i64 1802, !34, i64 1803}
!20 = !{!"b2ArenaAllocator", !21, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !22, i64 24}
!21 = !{!"any pointer", !8, i64 0}
!22 = !{!"", !21, i64 0, !7, i64 8, !7, i64 12}
!23 = !{!"b2BroadPhase", !8, i64 0, !7, i64 216, !24, i64 224, !22, i64 240, !21, i64 256, !21, i64 264, !7, i64 272, !25, i64 276, !24, i64 280}
!24 = !{!"b2HashSet", !21, i64 0, !7, i64 8, !7, i64 12}
!25 = !{!"b2AtomicInt", !7, i64 0}
!26 = !{!"b2ConstraintGraph", !8, i64 0}
!27 = !{!"b2IdPool", !22, i64 0, !7, i64 16}
!28 = !{!"b2BitSet", !21, i64 0, !7, i64 8, !7, i64 12}
!29 = !{!"long", !8, i64 0}
!30 = !{!"b2Vec2", !31, i64 0, !31, i64 4}
!31 = !{!"float", !8, i64 0}
!32 = !{!"short", !8, i64 0}
!33 = !{!"b2Profile", !31, i64 0, !31, i64 4, !31, i64 8, !31, i64 12, !31, i64 16, !31, i64 20, !31, i64 24, !31, i64 28, !31, i64 32, !31, i64 36, !31, i64 40, !31, i64 44, !31, i64 48, !31, i64 52, !31, i64 56, !31, i64 60, !31, i64 64, !31, i64 68, !31, i64 72, !31, i64 76, !31, i64 80, !31, i64 84}
!34 = !{!"_Bool", !8, i64 0}
!35 = !{!6, !7, i64 36}
!36 = !{!37, !7, i64 24}
!37 = !{!"b2GraphColor", !28, i64 0, !22, i64 16, !22, i64 32, !8, i64 48}
!38 = !{!37, !7, i64 40}
!39 = !{!7, !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass