; 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.b2WorldId = type { i16, i16 }
%struct.b2Vec2 = type { float, float }
%struct.b2QueryFilter = type { i64, i64 }
%struct.b2ShapeCastInput = type { %struct.b2ShapeProxy, %struct.b2Vec2, float, i8 }
%struct.b2ShapeProxy = type { [8 x %struct.b2Vec2], i32, float }
%struct.WorldMoverCastContext = type { ptr, %struct.b2QueryFilter, float }
%struct.b2TreeStats = type { i32, i32 }
%struct.b2Capsule = type { %struct.b2Vec2, %struct.b2Vec2, float }
%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.b2Profile = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [23 x i8], align 1
@b2_lengthUnitsPerMeter = external global float, align 4
@.str.65 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [38 x i8], align 1

; 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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #3

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

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

; 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) #5

declare zeroext i1 @b2IsValidVec2(<2 x float>) #2

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

; Function Attrs: nounwind uwtable
define dso_local float @b2World_CastMover(i32 %0, ptr noundef %1, <2 x float> %2, i64 %3, i64 %4) #6 {
  %6 = alloca float, align 4
  %7 = alloca %struct.b2WorldId, align 2
  %8 = alloca %struct.b2Vec2, align 4
  %9 = alloca %struct.b2QueryFilter, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.b2ShapeCastInput, align 4
  %14 = alloca %struct.WorldMoverCastContext, align 8
  %15 = alloca i32, align 4
  %16 = alloca %struct.b2TreeStats, align 4
  store i32 %0, ptr %7, align 2
  store <2 x float> %2, ptr %8, align 4
  %17 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  store i64 %3, ptr %17, align 8
  %18 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  store i64 %4, ptr %18, align 8
  store ptr %1, ptr %10, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %5
  %20 = load <2 x float>, ptr %8, align 4
  %21 = call zeroext i1 @b2IsValidVec2(<2 x float> %20)
  br i1 %21, label %26, label %22

22:                                               ; preds = %19
  %23 = call i32 @b2InternalAssertFcn(ptr noundef @.str.65, ptr noundef @.str.1, i32 noundef 2461)
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  call void @llvm.trap()
  br label %26

26:                                               ; preds = %25, %22, %19
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.b2Capsule, ptr %29, i32 0, i32 2
  %31 = load float, ptr %30, align 4, !tbaa !9
  %32 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !13
  %33 = fmul float 0x3F747AE140000000, %32
  %34 = fmul float 2.000000e+00, %33
  %35 = fcmp ogt float %31, %34
  br i1 %35, label %40, label %36

36:                                               ; preds = %28
  %37 = call i32 @b2InternalAssertFcn(ptr noundef @.str.66, ptr noundef @.str.1, i32 noundef 2462)
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  call void @llvm.trap()
  br label %40

40:                                               ; preds = %39, %36, %28
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %42 = load i32, ptr %7, align 2
  %43 = call ptr @b2GetWorldFromId(i32 %42)
  store ptr %43, ptr %11, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %41
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.b2World, ptr %45, i32 0, i32 61
  %47 = load i8, ptr %46, align 1, !tbaa !14, !range !29, !noundef !30
  %48 = trunc i8 %47 to i1
  %49 = zext i1 %48 to i32
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %55, label %51

51:                                               ; preds = %44
  %52 = call i32 @b2InternalAssertFcn(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 2465)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @llvm.trap()
  br label %55

55:                                               ; preds = %54, %51, %44
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.b2World, ptr %58, i32 0, i32 61
  %60 = load i8, ptr %59, align 1, !tbaa !14, !range !29, !noundef !30
  %61 = trunc i8 %60 to i1
  br i1 %61, label %62, label %63

62:                                               ; preds = %57
  store float 1.000000e+00, ptr %6, align 4
  store i32 1, ptr %12, align 4
  br label %120

63:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 88, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 4 %13, i8 0, i64 88, i1 false)
  %64 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 0
  %65 = getelementptr inbounds %struct.b2ShapeProxy, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %65, i64 0, i64 0
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.b2Capsule, ptr %67, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %66, ptr align 4 %68, i64 8, i1 false), !tbaa.struct !31
  %69 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 0
  %70 = getelementptr inbounds %struct.b2ShapeProxy, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds [8 x %struct.b2Vec2], ptr %70, i64 0, i64 1
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.b2Capsule, ptr %72, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 4 %73, i64 8, i1 false), !tbaa.struct !31
  %74 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 0
  %75 = getelementptr inbounds %struct.b2ShapeProxy, ptr %74, i32 0, i32 1
  store i32 2, ptr %75, align 4, !tbaa !32
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.b2Capsule, ptr %76, i32 0, i32 2
  %78 = load float, ptr %77, align 4, !tbaa !9
  %79 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 0
  %80 = getelementptr inbounds %struct.b2ShapeProxy, ptr %79, i32 0, i32 2
  store float %78, ptr %80, align 4, !tbaa !35
  %81 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !31
  %82 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 2
  store float 1.000000e+00, ptr %82, align 4, !tbaa !36
  %83 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 3
  store i8 1, ptr %83, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  %84 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 0
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %85, ptr %84, align 8, !tbaa !38
  %86 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %86, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !41
  %87 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 2
  store float 1.000000e+00, ptr %87, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !44
  br label %88

88:                                               ; preds = %111, %63
  %89 = load i32, ptr %15, align 4, !tbaa !44
  %90 = icmp slt i32 %89, 3
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 8, ptr %12, align 4
  br label %114

92:                                               ; preds = %88
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.b2World, ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds %struct.b2BroadPhase, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds [3 x %struct.b2DynamicTree], ptr %95, i64 0, i64 0
  %97 = load i32, ptr %15, align 4, !tbaa !44
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.b2DynamicTree, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.b2QueryFilter, ptr %9, i32 0, i32 1
  %101 = load i64, ptr %100, align 8, !tbaa !45
  %102 = call i64 @b2DynamicTree_ShapeCast(ptr noundef %99, ptr noundef %13, i64 noundef %101, ptr noundef @MoverCastCallback, ptr noundef %14)
  store i64 %102, ptr %16, align 4
  %103 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 2
  %104 = load float, ptr %103, align 8, !tbaa !43
  %105 = fcmp oeq float %104, 0.000000e+00
  br i1 %105, label %106, label %107

106:                                              ; preds = %92
  store float 0.000000e+00, ptr %6, align 4
  store i32 1, ptr %12, align 4
  br label %114

107:                                              ; preds = %92
  %108 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 2
  %109 = load float, ptr %108, align 8, !tbaa !43
  %110 = getelementptr inbounds %struct.b2ShapeCastInput, ptr %13, i32 0, i32 2
  store float %109, ptr %110, align 4, !tbaa !36
  br label %111

111:                                              ; preds = %107
  %112 = load i32, ptr %15, align 4, !tbaa !44
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %15, align 4, !tbaa !44
  br label %88, !llvm.loop !46

114:                                              ; preds = %106, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %115 = load i32, ptr %12, align 4
  switch i32 %115, label %119 [
    i32 8, label %116
  ]

116:                                              ; preds = %114
  %117 = getelementptr inbounds %struct.WorldMoverCastContext, ptr %14, i32 0, i32 2
  %118 = load float, ptr %117, align 8, !tbaa !43
  store float %118, ptr %6, align 4
  store i32 1, ptr %12, align 4
  br label %119

119:                                              ; preds = %116, %114
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %13) #7
  br label %120

120:                                              ; preds = %119, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %121 = load float, ptr %6, align 4
  ret float %121
}

; Function Attrs: nounwind uwtable
declare hidden float @MoverCastCallback(ptr noundef, i32 noundef, i64 noundef, ptr noundef) #6

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 = { "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 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 }

!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, !12, i64 16}
!10 = !{!"b2Capsule", !11, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"b2Vec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !28, i64 1799}
!15 = !{!"b2World", !16, i64 0, !19, i64 40, !22, i64 336, !23, i64 1008, !18, i64 1032, !23, i64 1048, !18, i64 1072, !23, i64 1088, !18, i64 1112, !23, i64 1128, !18, i64 1152, !23, i64 1168, !18, i64 1192, !23, i64 1208, !23, i64 1232, !18, i64 1256, !18, i64 1272, !18, i64 1288, !18, i64 1304, !18, i64 1320, !18, i64 1336, !18, i64 1352, !18, i64 1368, !7, i64 1384, !7, i64 1416, !17, i64 1448, !18, i64 1456, !24, i64 1472, !24, i64 1488, !24, i64 1504, !24, i64 1520, !25, i64 1536, !17, i64 1544, !11, i64 1548, !12, i64 1556, !12, i64 1560, !12, i64 1564, !12, i64 1568, !12, i64 1572, !12, i64 1576, !12, i64 1580, !12, i64 1584, !6, i64 1592, !6, i64 1600, !26, i64 1608, !27, i64 1612, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !17, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !12, i64 1784, !17, i64 1788, !17, i64 1792, !26, i64 1796, !28, i64 1798, !28, i64 1799, !28, i64 1800, !28, i64 1801, !28, i64 1802, !28, i64 1803}
!16 = !{!"b2ArenaAllocator", !6, i64 0, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !18, i64 24}
!17 = !{!"int", !7, i64 0}
!18 = !{!"", !6, i64 0, !17, i64 8, !17, i64 12}
!19 = !{!"b2BroadPhase", !7, i64 0, !17, i64 216, !20, i64 224, !18, i64 240, !6, i64 256, !6, i64 264, !17, i64 272, !21, i64 276, !20, i64 280}
!20 = !{!"b2HashSet", !6, i64 0, !17, i64 8, !17, i64 12}
!21 = !{!"b2AtomicInt", !17, i64 0}
!22 = !{!"b2ConstraintGraph", !7, i64 0}
!23 = !{!"b2IdPool", !18, i64 0, !17, i64 16}
!24 = !{!"b2BitSet", !6, i64 0, !17, i64 8, !17, i64 12}
!25 = !{!"long", !7, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = !{!"b2Profile", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84}
!28 = !{!"_Bool", !7, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{i64 0, i64 4, !13, i64 4, i64 4, !13}
!32 = !{!33, !17, i64 64}
!33 = !{!"b2ShapeCastInput", !34, i64 0, !11, i64 72, !12, i64 80, !28, i64 84}
!34 = !{!"b2ShapeProxy", !7, i64 0, !17, i64 64, !12, i64 68}
!35 = !{!33, !12, i64 68}
!36 = !{!33, !12, i64 80}
!37 = !{!33, !28, i64 84}
!38 = !{!39, !6, i64 0}
!39 = !{!"WorldMoverCastContext", !6, i64 0, !40, i64 8, !12, i64 24}
!40 = !{!"b2QueryFilter", !25, i64 0, !25, i64 8}
!41 = !{i64 0, i64 8, !42, i64 8, i64 8, !42}
!42 = !{!25, !25, i64 0}
!43 = !{!39, !12, i64 24}
!44 = !{!17, !17, i64 0}
!45 = !{!40, !25, i64 8}
!46 = distinct !{!46, !47}
!47 = !{!"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.b2ShapeCastInput = type { %struct.b2ShapeProxy, %struct.b2Vec2, float, i8 }
%struct.b2ShapeProxy = type { [8 x %struct.b2Vec2], i32, float }
%struct.b2Vec2 = type { float, float }
%struct.WorldMoverCastContext = type { ptr, %struct.b2QueryFilter, float }
%struct.b2QueryFilter = type { i64, i64 }

@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [23 x i8], align 1
@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4
@.str.65 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: mustprogress 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) local_unnamed_addr #1

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #3

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

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

declare zeroext i1 @b2IsValidVec2(<2 x float>) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local float @b2World_CastMover(i32 %0, ptr nocapture noundef readonly %1, <2 x float> %2, i64 %3, i64 %4) local_unnamed_addr #5 {
  %6 = alloca %struct.b2ShapeCastInput, align 16
  %7 = alloca %struct.WorldMoverCastContext, align 8
  %8 = tail call zeroext i1 @b2IsValidVec2(<2 x float> %2) #6
  br i1 %8, label %12, label %9

9:                                                ; preds = %5
  %10 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.65, ptr noundef nonnull @.str.1, i32 noundef 2461) #6
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %12, label %11

11:                                               ; preds = %9
  tail call void @llvm.trap()
  unreachable

12:                                               ; preds = %9, %5
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = load float, ptr %13, align 4, !tbaa !5
  %15 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !11
  %16 = fmul float %15, 0x3F747AE140000000
  %17 = fmul float %16, 2.000000e+00
  %18 = fcmp ogt float %14, %17
  br i1 %18, label %22, label %19

19:                                               ; preds = %12
  %20 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.66, ptr noundef nonnull @.str.1, i32 noundef 2462) #6
  %.not17 = icmp eq i32 %20, 0
  br i1 %.not17, label %22, label %21

21:                                               ; preds = %19
  tail call void @llvm.trap()
  unreachable

22:                                               ; preds = %12, %19
  %23 = tail call ptr @b2GetWorldFromId(i32 %0)
  %24 = getelementptr inbounds i8, ptr %23, i64 1799
  %25 = load i8, ptr %24, align 1, !tbaa !12, !range !28, !noundef !29
  %26 = icmp eq i8 %25, 0
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %22
  %28 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 2465) #6
  %.not18 = icmp eq i32 %28, 0
  br i1 %.not18, label %30, label %29

29:                                               ; preds = %27
  tail call void @llvm.trap()
  unreachable

30:                                               ; preds = %27
  %.pre = load i8, ptr %24, align 1, !tbaa !12, !range !28
  %31 = trunc nuw i8 %.pre to i1
  br i1 %31, label %56, label %.thread

.thread:                                          ; preds = %22, %30
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %6) #6
  %32 = getelementptr inbounds i8, ptr %6, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(88) %32, i8 0, i64 72, i1 false)
  %33 = load <2 x i64>, ptr %1, align 4
  store <2 x i64> %33, ptr %6, align 16
  %34 = getelementptr inbounds i8, ptr %6, i64 64
  store i32 2, ptr %34, align 16, !tbaa !30
  %35 = load float, ptr %13, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %6, i64 68
  store float %35, ptr %36, align 4, !tbaa !33
  %37 = getelementptr inbounds i8, ptr %6, i64 72
  store <2 x float> %2, ptr %37, align 8
  %38 = getelementptr inbounds i8, ptr %6, i64 80
  store float 1.000000e+00, ptr %38, align 16, !tbaa !34
  %39 = getelementptr inbounds i8, ptr %6, i64 84
  store i8 1, ptr %39, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  store ptr %23, ptr %7, align 8, !tbaa !36
  %40 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %3, ptr %40, align 8, !tbaa !39
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 16
  store i64 %4, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !39
  %41 = getelementptr inbounds i8, ptr %7, i64 24
  store float 1.000000e+00, ptr %41, align 8, !tbaa !40
  %42 = getelementptr inbounds i8, ptr %23, i64 40
  %43 = call i64 @b2DynamicTree_ShapeCast(ptr noundef nonnull %42, ptr noundef nonnull %6, i64 noundef %4, ptr noundef nonnull @MoverCastCallback, ptr noundef nonnull %7) #6
  %44 = load float, ptr %41, align 8, !tbaa !40
  %45 = fcmp oeq float %44, 0.000000e+00
  br i1 %45, label %.loopexit, label %46

46:                                               ; preds = %.thread
  store float %44, ptr %38, align 16, !tbaa !34
  %47 = getelementptr inbounds i8, ptr %23, i64 112
  %48 = call i64 @b2DynamicTree_ShapeCast(ptr noundef nonnull %47, ptr noundef nonnull %6, i64 noundef %4, ptr noundef nonnull @MoverCastCallback, ptr noundef nonnull %7) #6
  %49 = load float, ptr %41, align 8, !tbaa !40
  %50 = fcmp oeq float %49, 0.000000e+00
  br i1 %50, label %.loopexit, label %51

51:                                               ; preds = %46
  store float %49, ptr %38, align 16, !tbaa !34
  %52 = getelementptr inbounds i8, ptr %23, i64 184
  %53 = call i64 @b2DynamicTree_ShapeCast(ptr noundef nonnull %52, ptr noundef nonnull %6, i64 noundef %4, ptr noundef nonnull @MoverCastCallback, ptr noundef nonnull %7) #6
  %54 = load float, ptr %41, align 8, !tbaa !40
  %55 = fcmp oeq float %54, 0.000000e+00
  br i1 %55, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %51
  br label %.loopexit

.loopexit:                                        ; preds = %.thread, %46, %51, %.critedge
  %.1 = phi float [ %54, %.critedge ], [ 0.000000e+00, %51 ], [ 0.000000e+00, %46 ], [ 0.000000e+00, %.thread ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #6
  br label %56

56:                                               ; preds = %30, %.loopexit
  %.2 = phi float [ %.1, %.loopexit ], [ 1.000000e+00, %30 ]
  ret float %.2
}

; Function Attrs: nounwind uwtable
declare hidden float @MoverCastCallback(ptr noundef, i32 noundef, i64 noundef, ptr noundef) #5

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


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